DevTools: Replace camel case variable names (#32726)

* refactor: rename to snake case

* refactor: more renaming

* chore: format

* chore: clean
This commit is contained in:
eri 2024-07-08 13:18:35 +02:00 committed by GitHub
parent b243457ccc
commit 2888193cfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 363 additions and 323 deletions

View file

@ -20,6 +20,7 @@ struct GetDescriptionReply {
// This is only a minimal subset of the properties exposed/expected by Firefox
// (see https://searchfox.org/mozilla-central/source/devtools/shared/system.js#45)
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
struct SystemInfo {
apptype: String,
// Display version
@ -30,7 +31,7 @@ struct SystemInfo {
// Firefox major.minor version number, use for compatibility checks
platformversion: String,
// Display name
brandName: String,
brand_name: String,
}
include!(concat!(env!("OUT_DIR"), "/build_id.rs"));
@ -60,7 +61,7 @@ impl Actor for DeviceActor {
version: env!("CARGO_PKG_VERSION").to_string(),
appbuildid: BUILD_ID.to_string(),
platformversion: "125.0".to_string(),
brandName: "Servo".to_string(),
brand_name: "Servo".to_string(),
},
};
let _ = stream.write_json_packet(&msg);
@ -80,7 +81,7 @@ impl DeviceActor {
pub fn description() -> ActorDescription {
ActorDescription {
category: "actor",
typeName: "device",
type_name: "device",
methods: vec![Method {
name: "getDescription",
request: Value::Null,