Skip to content

Commit 30f3d05

Browse files
committed
fmt
1 parent e74c4dd commit 30f3d05

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

codegen/rust/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@ pub fn emit(
101101
// On failure write generated code to a tempfile
102102
println!("Code generation produced unparsable code");
103103
write_to_tempfile(&tokens)?;
104-
return Err(io::Error::other(
105-
format!("Failed to parse generated code: {:?}", e),
106-
));
104+
return Err(io::Error::other(format!(
105+
"Failed to parse generated code: {:?}",
106+
e
107+
)));
107108
}
108109
};
109110
fs::write(filename, prettyplease::unparse(&f))?;

lang/p4rs/src/table.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@ impl Key {
8383
}
8484
}
8585

86-
#[derive(Debug, Clone, PartialEq, Hash, Eq, Serialize, Deserialize)]
87-
#[derive(Default)]
86+
#[derive(
87+
Debug, Clone, PartialEq, Hash, Eq, Serialize, Deserialize, Default,
88+
)]
8889
pub enum Ternary {
8990
#[default]
9091
DontCare,
9192
Value(BigUintKey),
9293
Masked(BigUint, BigUint, usize),
9394
}
9495

95-
9696
#[derive(Debug, Clone, PartialEq, Hash, Eq, Serialize, Deserialize)]
9797
pub struct Prefix {
9898
pub addr: IpAddr,

0 commit comments

Comments
 (0)