Skip to content

Commit

Permalink
Merge pull request #441 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 Dec 2, 2024
2 parents 81c9261 + 362e4a4 commit 3bd7c3a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
21 changes: 6 additions & 15 deletions src/endpoint/configured.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,10 +543,7 @@ impl<'a> PreparedContainer<'a> {
Ok(create_info)
}

async fn copy_source_to_container<'ca>(
container: &Container<'ca>,
job: &RunnableJob,
) -> Result<()> {
async fn copy_source_to_container(container: &Container<'_>, job: &RunnableJob) -> Result<()> {
use tokio::io::AsyncReadExt;

job.package_sources()
Expand Down Expand Up @@ -614,10 +611,7 @@ impl<'a> PreparedContainer<'a> {
.map_err(Error::from)
}

async fn copy_patches_to_container<'ca>(
container: &Container<'ca>,
job: &RunnableJob,
) -> Result<()> {
async fn copy_patches_to_container(container: &Container<'_>, job: &RunnableJob) -> Result<()> {
use tokio::io::AsyncReadExt;

debug!(
Expand Down Expand Up @@ -672,8 +666,8 @@ impl<'a> PreparedContainer<'a> {
.map_err(Error::from)
}

async fn copy_artifacts_to_container<'ca>(
container: &Container<'ca>,
async fn copy_artifacts_to_container(
container: &Container<'_>,
job: &RunnableJob,
staging_store: Arc<RwLock<StagingStore>>,
release_stores: &[Arc<ReleaseStore>],
Expand Down Expand Up @@ -777,10 +771,7 @@ impl<'a> PreparedContainer<'a> {
.map(|_| ())
}

async fn copy_script_to_container<'ca>(
container: &Container<'ca>,
script: &Script,
) -> Result<()> {
async fn copy_script_to_container(container: &Container<'_>, script: &Script) -> Result<()> {
let script_path = PathBuf::from(crate::consts::SCRIPT_PATH);
container
.copy_file_into(script_path, script.as_ref().as_bytes())
Expand Down Expand Up @@ -932,7 +923,7 @@ pub struct ExecutedContainer<'a> {
exit_info: Option<(bool, Option<String>)>,
}

impl<'a> ExecutedContainer<'a> {
impl ExecutedContainer<'_> {
pub fn container_hash(&self) -> ContainerHash {
ContainerHash::from(self.create_info.id.clone())
}
Expand Down
2 changes: 1 addition & 1 deletion src/endpoint/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ struct LogReceiver<'a> {
bar: ProgressBar,
}

impl<'a> LogReceiver<'a> {
impl LogReceiver<'_> {
async fn join(mut self) -> Result<String> {
let mut success = None;
// Reserve a reasonable amount of elements.
Expand Down
2 changes: 1 addition & 1 deletion src/orchestrator/orchestrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ impl Borrow<ArtifactPath> for ProducedArtifact {
}
}

impl<'a> Orchestrator<'a> {
impl Orchestrator<'_> {
pub async fn run(self, output: &mut Vec<ArtifactPath>) -> Result<HashMap<Uuid, Error>> {
let (results, errors) = self.run_tree().await?;
output.extend(results);
Expand Down

0 comments on commit 3bd7c3a

Please sign in to comment.