Skip to content

Commit

Permalink
Merge pull request science-computing#435 from primeos-work/clippy-fixes
Browse files Browse the repository at this point in the history
Remove needless lifetimes to fix Clippy warnings
  • Loading branch information
primeos-work authored Nov 4, 2024
2 parents f2c8507 + 463111e commit 95fba34
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/db/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub struct DbConnectionConfig<'a> {
database_connection_timeout: u16,
}

impl<'a> std::fmt::Debug for DbConnectionConfig<'a> {
impl std::fmt::Debug for DbConnectionConfig<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(
f,
Expand Down
2 changes: 1 addition & 1 deletion src/filestore/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ impl<'a> FullArtifactPath<'a> {
#[derive(Debug)]
pub struct FullArtifactPathDisplay<'a>(&'a StoreRoot, &'a ArtifactPath);

impl<'a> std::fmt::Display for FullArtifactPathDisplay<'a> {
impl std::fmt::Display for FullArtifactPathDisplay<'_> {
fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(fmt, "{}/{}", self.0.display(), self.1.display())
}
Expand Down
2 changes: 1 addition & 1 deletion src/orchestrator/orchestrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ struct JobTask<'a> {
/// runtime stops running it because some other `JobTask` errored.
///
/// In the latter case, we cleanup by telling the progressbar to finish.
impl<'a> Drop for JobTask<'a> {
impl Drop for JobTask<'_> {
fn drop(&mut self) {
if !self.bar.is_finished() {
// If there are dependencies, the error is probably from another task
Expand Down
2 changes: 1 addition & 1 deletion src/orchestrator/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl AsReceivedErrorDisplay for HashMap<Uuid, Error> {

pub struct ReceivedErrorDisplay<'a>(&'a HashMap<Uuid, Error>);

impl<'a> std::fmt::Display for ReceivedErrorDisplay<'a> {
impl std::fmt::Display for ReceivedErrorDisplay<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.0
.iter()
Expand Down
2 changes: 1 addition & 1 deletion src/package/dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ impl Dag {
#[derive(Clone)]
pub struct DagDisplay<'a>(&'a Dag, daggy::NodeIndex, Option<daggy::EdgeIndex>);

impl<'a> TreeItem for DagDisplay<'a> {
impl TreeItem for DagDisplay<'_> {
type Child = Self;

fn write_self<W: Write>(&self, f: &mut W, _: &Style) -> IoResult<()> {
Expand Down
2 changes: 1 addition & 1 deletion src/package/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl std::fmt::Debug for Package {
pub struct DebugPackage<'a>(&'a Package);

#[cfg(debug_assertions)]
impl<'a> std::fmt::Debug for DebugPackage<'a> {
impl std::fmt::Debug for DebugPackage<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
writeln!(
f,
Expand Down
2 changes: 1 addition & 1 deletion src/ui/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub fn handlebars_for_package_printing(format: &str) -> Result<Handlebars> {
Ok(hb)
}

impl<'a, P: Borrow<Package>> PreparePrintPackage<'a, P> {
impl<P: Borrow<Package>> PreparePrintPackage<'_, P> {
pub fn into_displayable(self) -> Result<PrintablePackage> {
let script = ScriptBuilder::new(&Shebang::from(self.config.shebang().clone()))
.build(
Expand Down

0 comments on commit 95fba34

Please sign in to comment.