Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: simplify some statements for readability #169

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ fn main() {

let the_string = "Hello, world!";
clipboard.set_text(the_string).unwrap();
println!("But now the clipboard text should be: \"{}\"", the_string);
println!("But now the clipboard text should be: \"{the_string}\"");
}
2 changes: 1 addition & 1 deletion src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl std::fmt::Debug for Error {
ConversionFailure,
Unknown { .. }
);
f.write_fmt(format_args!("{} - \"{}\"", name, self))
f.write_fmt(format_args!("{name} - \"{self}\""))
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ mod tests {
match ctx.get_text() {
Ok(text) => assert!(text.is_empty()),
Err(Error::ContentNotAvailable) => {}
Err(e) => panic!("unexpected error: {}", e),
Err(e) => panic!("unexpected error: {e}"),
};

// confirm it is OK to clear when already empty.
Expand All @@ -310,7 +310,7 @@ mod tests {
match ctx.get_text() {
Ok(text) => assert!(text.is_empty()),
Err(Error::ContentNotAvailable) => {}
Err(e) => panic!("unexpected error: {}", e),
Err(e) => panic!("unexpected error: {e}"),
};
}
{
Expand Down
Loading