summaryrefslogtreecommitdiff
path: root/ci-lib-native
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2023-10-29 15:43:03 -0700
committeriximeow <me@iximeow.net>2023-10-29 15:43:03 -0700
commitc0ed2168c6b39301511b84f52bd3f7b57a39024d (patch)
tree28ce2666e1d6ad052a31cbdb9a1c487f83a91e7a /ci-lib-native
parent6f78ee3f15421b3450428e711659b28be0eccd7b (diff)
no more warnings :)runner-local-mode
Diffstat (limited to 'ci-lib-native')
-rw-r--r--ci-lib-native/src/dbctx_ext.rs1
-rw-r--r--ci-lib-native/src/io.rs5
-rw-r--r--ci-lib-native/src/notifier.rs4
3 files changed, 4 insertions, 6 deletions
diff --git a/ci-lib-native/src/dbctx_ext.rs b/ci-lib-native/src/dbctx_ext.rs
index 44436fc..65ee851 100644
--- a/ci-lib-native/src/dbctx_ext.rs
+++ b/ci-lib-native/src/dbctx_ext.rs
@@ -1,6 +1,5 @@
use crate::io::ArtifactDescriptor;
use crate::notifier::{RemoteNotifier, NotifierConfig};
-use tokio::fs::{File, OpenOptions};
use ci_lib_core::dbctx::DbCtx;
diff --git a/ci-lib-native/src/io.rs b/ci-lib-native/src/io.rs
index d41349c..6071794 100644
--- a/ci-lib-native/src/io.rs
+++ b/ci-lib-native/src/io.rs
@@ -1,11 +1,9 @@
use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt};
use futures_util::StreamExt;
use tokio::fs::File;
-use std::io::Write;
use tokio::fs::OpenOptions;
use std::task::{Poll, Context};
use std::pin::Pin;
-use std::time::{UNIX_EPOCH, SystemTime};
use std::sync::{Arc, Mutex};
#[derive(Clone)]
@@ -26,7 +24,7 @@ impl VecSink {
impl tokio::io::AsyncWrite for VecSink {
fn poll_write(
self: Pin<&mut Self>,
- cx: &mut Context,
+ _cx: &mut Context,
buf: &[u8]
) -> Poll<Result<usize, std::io::Error>> {
self.body.lock().unwrap().extend_from_slice(buf);
@@ -92,6 +90,7 @@ impl tokio::io::AsyncWrite for ArtifactStream {
pub struct ArtifactDescriptor {
+ #[allow(dead_code)]
job_id: u64,
pub artifact_id: u64,
file: File,
diff --git a/ci-lib-native/src/notifier.rs b/ci-lib-native/src/notifier.rs
index dd4a35c..a6d7469 100644
--- a/ci-lib-native/src/notifier.rs
+++ b/ci-lib-native/src/notifier.rs
@@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};
use std::sync::Arc;
use axum::http::StatusCode;
use lettre::transport::smtp::authentication::{Credentials, Mechanism};
-use lettre::{Message, Transport};
+use lettre::Message;
use lettre::transport::smtp::extension::ClientId;
use lettre::transport::smtp::client::{SmtpConnection, TlsParametersBuilder};
use std::time::Duration;
@@ -88,7 +88,7 @@ impl RemoteNotifier {
}
}
- pub async fn tell_job_status(&self, ctx: &Arc<DbCtx>, repo_id: u64, sha: &str, job_id: u64, state: &str, desc: &str, target_url: &str) -> Result<(), String> {
+ pub async fn tell_job_status(&self, _ctx: &Arc<DbCtx>, _repo_id: u64, sha: &str, _job_id: u64, state: &str, desc: &str, target_url: &str) -> Result<(), String> {
match &self.notifier {
NotifierConfig::GitHub { token } => {
let status_info = serde_json::json!({