Skip to content

Commit

Permalink
chore: Remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Dec 3, 2023
1 parent 8b8f6bd commit a1926e0
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion extensions/warp-ipfs/src/store/conversation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use uuid::Uuid;
use warp::{
crypto::{cipher::Cipher, did_key::CoreSign, DIDKey, Ed25519KeyPair, KeyMaterial, DID},
error::Error,
logging::tracing::log::info,
logging::tracing::info,
raygun::{
Conversation, ConversationType, Message, MessageOptions, MessagePage, MessageReference,
Messages, MessagesType,
Expand Down
8 changes: 4 additions & 4 deletions extensions/warp-ipfs/src/store/document/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use futures::{
SinkExt, StreamExt,
};
use libipld::Cid;
use rust_ipfs::{Ipfs, IpfsPath};
use rust_ipfs::Ipfs;
use warp::{crypto::DID, error::Error};

use super::identity::IdentityDocument;
Expand Down Expand Up @@ -216,7 +216,7 @@ impl IdentityCacheTask {
if let Some(path) = self.path.as_ref() {
let cid = cid.to_string();
if let Err(e) = tokio::fs::write(path.join(".cache_id"), cid).await {
tracing::log::error!("Error writing cid to file: {e}");
tracing::error!("Error writing cid to file: {e}");
}
}

Expand All @@ -232,7 +232,7 @@ impl IdentityCacheTask {
if let Some(path) = self.path.as_ref() {
let cid = cid.to_string();
if let Err(e) = tokio::fs::write(path.join(".cache_id"), cid).await {
tracing::log::error!("Error writing cid to file: {e}");
tracing::error!("Error writing cid to file: {e}");
}
}

Expand Down Expand Up @@ -307,7 +307,7 @@ impl IdentityCacheTask {
if let Some(path) = self.path.as_ref() {
let cid = cid.to_string();
if let Err(e) = tokio::fs::write(path.join(".cache_id"), cid).await {
tracing::log::error!("Error writing cid to file: {e}");
tracing::error!("Error writing cid to file: {e}");
}
}

Expand Down
2 changes: 1 addition & 1 deletion extensions/warp-ipfs/src/store/document/conversation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ impl ConversationTask {
if let Some(path) = self.path.as_ref() {
let cid = cid.to_string();
if let Err(e) = tokio::fs::write(path.join(".message_id"), cid).await {
tracing::log::error!("Error writing to '.message_id': {e}.")
tracing::error!("Error writing to '.message_id': {e}.")
}
}

Expand Down
9 changes: 4 additions & 5 deletions extensions/warp-ipfs/src/store/document/image_dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use libipld::Cid;
use rust_ipfs::{Ipfs, PeerId};
use serde::{Deserialize, Serialize};
use std::task::Poll;
use tracing::log;
use warp::{constellation::file::FileType, error::Error, multipass::identity::IdentityImage};

#[derive(Deserialize, Serialize, Debug, Clone)]
Expand Down Expand Up @@ -39,15 +38,15 @@ pub async fn store_photo(
}));
}
}
log::trace!("{written} bytes written");
tracing::trace!("{written} bytes written");
}
Poll::Ready(Some(rust_ipfs::unixfs::UnixfsStatus::CompletedStatus {
path,
written,
..
})) => {
size = written;
log::debug!("Image is written with {written} bytes - stored at {path}");
tracing::debug!("Image is written with {written} bytes - stored at {path}");
return Poll::Ready(path.root().cid().copied().ok_or(Error::Other));
}
Poll::Ready(Some(rust_ipfs::unixfs::UnixfsStatus::FailedStatus {
Expand All @@ -57,13 +56,13 @@ pub async fn store_photo(
})) => {
let err = match error {
Some(e) => {
log::error!(
tracing::error!(
"Error uploading picture with {written} bytes written with error: {e}"
);
e.into()
}
None => {
log::error!("Error uploading picture with {written} bytes written");
tracing::error!("Error uploading picture with {written} bytes written");
Error::OtherWithContext("Error uploading photo".into())
}
};
Expand Down
2 changes: 1 addition & 1 deletion extensions/warp-ipfs/src/store/document/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ impl RootDocumentTask {
if let Some(path) = self.path.as_ref() {
let cid = root_cid.to_string();
if let Err(e) = tokio::fs::write(path.join(".id"), cid).await {
tracing::log::error!("Error writing to '.id': {e}.")
tracing::error!("Error writing to '.id': {e}.")
}
}

Expand Down
2 changes: 1 addition & 1 deletion extensions/warp-ipfs/src/store/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{
use futures::{channel::mpsc, StreamExt};
use rust_ipfs::Ipfs;
use tokio::{sync::RwLock, task::JoinHandle};
use tracing::{error};
use tracing::error;
use warp::{
crypto::{
cipher::Cipher,
Expand Down
2 changes: 1 addition & 1 deletion extensions/warp-ipfs/src/thumbnail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use image::io::Reader as ImageReader;
use image::ImageFormat;
use tokio::sync::Mutex;
use tokio::task::JoinHandle;
use warp::{constellation::file::FileType, error::Error, logging::tracing::log};
use warp::{constellation::file::FileType, error::Error};

use crate::utils::ExtensionType;

Expand Down

0 comments on commit a1926e0

Please sign in to comment.