mirror of
https://github.com/narrrl/proton-sdk-rs.git
synced 2026-11-03 16:41:26 +01:00
added ci
This commit is contained in:
1 parent
ec7de59851
commit
800fe7b612
4 files changed
+50
-6
No files matched your search
@@ -971,6 +971,7 @@ impl ProtonDriveClient {
|
||||
///
|
||||
/// `reader` is a blocking [`Read`]; reads happen between block uploads, so a
|
||||
/// slow reader stalls the upload but never buffers more than one block.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub async fn upload_file_from<R: Read + Send>(
|
||||
&self,
|
||||
parent_uid: &NodeUid,
|
||||
@@ -1048,6 +1049,7 @@ impl ProtonDriveClient {
|
||||
/// photos share's membership address), and the seal adds a `Photo` attribute
|
||||
/// block. Errors when the account has no photos volume. Live validation
|
||||
/// pending.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(crate) async fn upload_photo_from<R: Read + Send>(
|
||||
&self,
|
||||
name: &str,
|
||||
|
||||
@@ -157,6 +157,7 @@ impl ProtonPhotosClient {
|
||||
/// `reader` / `intended_size` / `thumbnails` / `aead` semantics; the seal
|
||||
/// additionally records the photo metadata (capture time, content hash,
|
||||
/// tags).
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub async fn upload_photo_from<R: Read + Send>(
|
||||
&self,
|
||||
name: &str,
|
||||
|
||||
@@ -219,8 +219,9 @@ fn read_dotenv() -> Result<(String, String), Box<dyn std::error::Error>> {
|
||||
/// `PROTON_TOTP_SECRET=` line in `.env`.
|
||||
fn read_totp_secret() -> Option<String> {
|
||||
if let Ok(s) = std::env::var("PROTON_TOTP_SECRET") {
|
||||
if !s.trim().is_empty() {
|
||||
return Some(s.trim().to_owned());
|
||||
let trimmed = s.trim();
|
||||
if !trimmed.is_empty() {
|
||||
return Some(trimmed.to_owned());
|
||||
}
|
||||
}
|
||||
let path = concat!(env!("CARGO_MANIFEST_DIR"), "/../../.env");
|
||||
@@ -231,10 +232,11 @@ fn read_totp_secret() -> Option<String> {
|
||||
continue;
|
||||
}
|
||||
if let Some((k, v)) = line.split_once('=') {
|
||||
if k.trim() == "PROTON_TOTP_SECRET" {
|
||||
let v = v.trim();
|
||||
if !v.is_empty() {
|
||||
return Some(v.to_owned());
|
||||
let key = k.trim();
|
||||
if key == "PROTON_TOTP_SECRET" {
|
||||
let val = v.trim();
|
||||
if !val.is_empty() {
|
||||
return Some(val.to_owned());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user