Skip to content

Commit ec96ac2

Browse files
authored
Clippy (#76)
1 parent e7b9299 commit ec96ac2

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

jruby_executable/src/bin/jruby_check.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fn jruby_check(args: &RubyArgs) -> Result<(), Box<dyn Error>> {
4444
let image_name = format!("heroku/jruby-builder:{base_image}");
4545

4646
let mut stream = log
47-
.bullet(format!("Dockerfile for {}", image_name))
47+
.bullet(format!("Dockerfile for {image_name}"))
4848
.start_stream("Contents");
4949

5050
let dockerfile = formatdoc! {"
@@ -54,7 +54,7 @@ fn jruby_check(args: &RubyArgs) -> Result<(), Box<dyn Error>> {
5454
RUN apt-get update -y; apt-get install default-jre default-jdk -y
5555
"};
5656

57-
write!(stream, "{}", dockerfile)?;
57+
write!(stream, "{dockerfile}")?;
5858

5959
fs_err::write(&dockerfile_path, dockerfile)?;
6060

shared/src/download_ruby_version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl RubyDownloadVersion {
8181
}
8282

8383
pub fn dir_name_format(&self) -> String {
84-
format!("ruby-{}", self)
84+
format!("ruby-{self}")
8585
}
8686

8787
pub fn download_url(&self) -> String {

shared/src/inventory_help.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn parse_inventory(
151151
/// Returns the sha256 hash of the file at the given path
152152
pub fn sha256_from_path(path: &Path) -> Result<String, Error> {
153153
digest::<Sha256>(fs_err::File::open(path).map_err(Error::FsError)?)
154-
.map(|digest| format!("{:x}", digest))
154+
.map(|digest| format!("{digest:x}"))
155155
.map_err(|e| {
156156
Error::Other(format!(
157157
"Error {e} calculating sha256 for {path}",

shared/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ pub fn append_filename_with(path: &Path, append: &str, ends_with: &str) -> Resul
4646

4747
if !file_name.ends_with(ends_with) {
4848
Err(Error::Other(format!(
49-
"File name {} does not end with {}",
50-
file_name, ends_with
49+
"File name {file_name} does not end with {ends_with}"
5150
)))?;
5251
}
5352
let file_base = file_name.trim_end_matches(ends_with);

0 commit comments

Comments
 (0)