Skip to content

Commit

Permalink
all: don't use gen identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
mahkoh committed Oct 20, 2024
1 parent 448b9e3 commit b6345f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/pipewire/pw_con.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ impl PwCon {
|fmt| {
f(fmt);
if self.ack_registry_generation.get() != self.registry_generation.get() {
let gen = self.registry_generation.get();
let generation = self.registry_generation.get();
fmt.write_struct(|f| {
f.write_id(FOOTER_REGISTRY_GENERATION);
f.write_struct(|f| {
f.write_ulong(gen);
f.write_ulong(generation);
});
});
self.ack_registry_generation.set(gen);
self.ack_registry_generation.set(generation);
}
},
);
Expand Down Expand Up @@ -415,9 +415,9 @@ impl Incoming {
let s2 = p2.read_struct()?;
if opcode == FOOTER_REGISTRY_GENERATION {
let mut p3 = s2.fields;
let gen = p3.read_ulong()?;
self.con.registry_generation.set(gen);
log::debug!("registry generation = {}", gen);
let generation = p3.read_ulong()?;
self.con.registry_generation.set(generation);
log::debug!("registry generation = {}", generation);
} else {
log::warn!("Unknown message footer: {}", opcode);
}
Expand Down
4 changes: 2 additions & 2 deletions src/utils/opaque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ pub struct Opaque {
pub fn opaque() -> Opaque {
let mut rng = thread_rng();
Opaque {
lo: rng.gen(),
hi: rng.gen(),
lo: rng.r#gen(),
hi: rng.r#gen(),
}
}

Expand Down

0 comments on commit b6345f0

Please sign in to comment.