Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tiborschneider committed Sep 26, 2024
1 parent 7624230 commit ede06ee
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bgpsim-web/src/draw/canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ fn prepare_touch() -> (Callback<TouchEvent>, Callback<TouchEvent>) {
n.dim.add_offset(delta);
});
};
} else if new_touches.len() > 1 {
} else {
log::debug!("multi-touch not yet supported");
}
*old_touches = new_touches;
Expand Down
4 changes: 2 additions & 2 deletions bgpsim-web/src/sidebar/router_cfg/route_map_match_cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ impl MatchValue {
return Some(Self::Integer(x));
}
if let Some(vs) = s
.split(|c| c == ',' || c == ';')
.split([',', ';'])
.map(|x| Pfx::from_str(x.trim()).ok())
.collect::<Option<BTreeSet<Pfx>>>()
{
return Some(Self::PrefixList(vs));
}
if let Some(vs) = s
.split(|c| c == ',' || c == ';')
.split([',', ';'])
.map(|x| x.trim().parse::<u32>().ok())
.collect::<Option<BTreeSet<u32>>>()
{
Expand Down
2 changes: 1 addition & 1 deletion bgpsim/generate_topology_zoo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fn main() {
}
let topo_name = file_name.trim_end_matches(".graphml");
// check if all chars are ascii
if !topo_name.chars().all(|c| c.is_ascii()) {
if !topo_name.is_ascii() {
continue;
}
// make sure the name only contains spaces, lowercase and uppercase letters, and starts
Expand Down
2 changes: 1 addition & 1 deletion bgpsim/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ impl<P: Prefix, Q: EventQueue<P>, Ospf: OspfImpl> NetworkBuilder<P, Q, Ospf>
// build a local LUT
let lut: HashMap<RouterId, GaoRexfordPeerType> = self
.external_indices()
.map(|ext| (ext, peer_type(ext, &self, a.clone())))
.map(|ext| (ext, peer_type(ext, self, a.clone())))
.collect();

_build_gao_rexford(self, lut)
Expand Down

0 comments on commit ede06ee

Please sign in to comment.