rust: Add a make rustfmt
, run it
It is actually really nice that there's One Canonical Style, even if I sometimes don't like some details of what rustfmt does. Closes: #1444 Approved by: jlebon
This commit is contained in:
parent
e731f59007
commit
d7b4046599
@ -103,4 +103,8 @@ EXTRA_DIST += $(LIBRPMOSTREE_RUST_SRCS) rust/Cargo.lock
|
||||
rpm_ostree_CFLAGS += -Irust/include
|
||||
rpm_ostree_SOURCES += rust/include/librpmostree-rust.h
|
||||
rpm_ostree_LDADD += $(librpmostree_rust_path)
|
||||
rustfmt:
|
||||
rustfmt $(LIBRPMOSTREE_RUST_SRCS)
|
||||
endif # ENABLE_RUST
|
||||
# Outside the ifdef, otherwise automake complains
|
||||
.PHONY: rustfmt
|
||||
|
@ -50,7 +50,9 @@ pub fn treefile_read_impl<W: io::Write>(filename: &Path, output: W) -> io::Resul
|
||||
}
|
||||
|
||||
fn whitespace_split_packages(pkgs: &[String]) -> Vec<String> {
|
||||
pkgs.iter().flat_map(|pkg| pkg.split_whitespace().map(String::from)).collect()
|
||||
pkgs.iter()
|
||||
.flat_map(|pkg| pkg.split_whitespace().map(String::from))
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
Loading…
Reference in New Issue
Block a user