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

Reorganising the code with proper crate structure #55

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

itsparser
Copy link
Contributor

No description provided.

Copy link

dagshub bot commented Feb 15, 2024

@itsparser itsparser merged commit 7e8cdcf into orcaci:main Feb 15, 2024
3 checks passed

pub async fn create(&self, bucket: &str, key: &str, data: &[u8]) -> CeriumResult<()> {
let _bucket_obj = self.get_bucket(bucket)?;
let result = _bucket_obj.put_object(key, data).await?;

Check warning

Code scanning / clippy

unused variable: result Warning

unused variable: result
Ok(())
}

pub async fn delete(&self, bucket: &String, key: &String) -> CeriumResult<()> {

Check warning

Code scanning / clippy

writing &String instead of &str involves a new object where a slice will do Warning

writing &String instead of &str involves a new object where a slice will do
Comment on lines +25 to +30
return S3Client::new(
&std::env::var("STORAGE_ACCESS_KEY").expect("STORAGE_ACCESS_KEY must be set."),
&std::env::var("STORAGE_ACCESS_SECRET").expect("STORAGE_ACCESS_SECRET must be set."),
&std::env::var("STORAGE_BASE_URL").expect("STORAGE_BASE_URL must be set."),
)
.expect("Error While create Storage Client");

Check warning

Code scanning / clippy

unneeded return statement Warning

unneeded return statement
use std::fs;
use std::io::Write;

use s3::Region;

Check warning

Code scanning / clippy

unused import: s3::Region Warning

unused import: s3::Region
file.write_all(&*result).expect("error");

let content = self.driver.take_screenshot().await?;
let result = self.storage_cli.create("orca", format!("{id}.png").as_str(), content.as_slice()).await;

Check warning

Code scanning / clippy

unused variable: result Warning

unused variable: result
kind: Set(BlockKind::Reference),
type_field: Set(BlockType::ActionGroup),
reference: Set(Some(app_g.clone().id)),
parent_id: Set(Some(uuid2.clone())),

Check warning

Code scanning / clippy

using clone on type Uuid which implements the Copy trait Warning

using clone on type Uuid which implements the Copy trait
@@ -1,3 +1,4 @@
use std::sync::Arc;

Check warning

Code scanning / clippy

unused import: std::sync::Arc Warning

unused import: std::sync::Arc
ActiveModelTrait, ColumnTrait, DatabaseTransaction, EntityTrait, IntoActiveModel, QueryFilter,
QueryOrder, QuerySelect, TryIntoModel,
};
use futures::executor::block_on;

Check warning

Code scanning / clippy

unused import: futures::executor::block_on Warning

unused import: futures::executor::block\_on
QueryOrder, QuerySelect, TryIntoModel,
};
use futures::executor::block_on;
use sea_orm::{ActiveModelTrait, ColumnTrait, DatabaseTransaction, EntityTrait, IntoActiveModel, ModelTrait, NotSet, QueryFilter, QueryOrder, QuerySelect, TryIntoModel};

Check warning

Code scanning / clippy

unused import: ModelTrait Warning

unused import: ModelTrait
QueryOrder, QuerySelect, TryIntoModel,
};
use futures::executor::block_on;
use sea_orm::{ActiveModelTrait, ColumnTrait, DatabaseTransaction, EntityTrait, IntoActiveModel, ModelTrait, NotSet, QueryFilter, QueryOrder, QuerySelect, TryIntoModel};

Check warning

Code scanning / clippy

unused imports: ModelTrait, NotSet Warning

unused imports: ModelTrait, NotSet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant