Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions crates/rrg/src/action/get_file_contents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,6 @@ impl crate::request::Args for Args {

let len = match proto.length() {
0 => usize::MAX,
len if len > MAX_BLOB_LEN as u64 => {
return Err(ParseArgsError::invalid_field("length", LenError {
len,
}));
}
len => len as usize,
};

Expand Down Expand Up @@ -213,26 +208,6 @@ impl std::fmt::Display for FileErrorKind {
}
}

/// An error indicating that the action was invoked with invalid length.
#[derive(Debug)]
struct LenError {
len: u64,
}

impl std::fmt::Display for LenError {

fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
write! {
fmt,
"provided length ({}) is bigger than allowed ({})",
self.len, MAX_BLOB_LEN
}
}
}

impl std::error::Error for LenError {
}

#[cfg(test)]
mod tests {

Expand Down
25 changes: 0 additions & 25 deletions crates/rrg/src/action/get_file_contents_kmx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,6 @@ impl crate::request::Args for Args {

let len = match proto.length() {
0 => usize::MAX,
len if len > MAX_BLOB_LEN as u64 => {
return Err(ParseArgsError::invalid_field("length", LenError {
len,
}));
},
len => len as usize,
};

Expand Down Expand Up @@ -346,26 +341,6 @@ impl std::fmt::Display for FileErrorKind {
}
}

/// An error indicating that the action was invoked with invalid length.
#[derive(Debug)]
struct LenError {
len: u64,
}

impl std::fmt::Display for LenError {

fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
write! {
fmt,
"provided length ({}) is bigger than allowed ({})",
self.len, MAX_BLOB_LEN
}
}
}

impl std::error::Error for LenError {
}

#[cfg(test)]
mod tests {

Expand Down
Loading