Commit 69920c31 authored by Konrad Borowski's avatar Konrad Borowski

Resolve clippy::try_err warnings

parent a8ee8373
Pipeline #99052569 passed with stages
in 23 minutes and 14 seconds
......@@ -75,13 +75,13 @@ pub fn insert(
.ok_or_else(|| warp::reject::custom(CustomRejection::UnrecognizedLanguageIdentifier))?;
for (field, name) in &[(&paste, "paste"), (&stdin, "stdin")] {
if field.len() > 1_000_000 {
Err(warp::reject::custom(CustomRejection::FieldTooLarge(name)))?;
return Err(warp::reject::custom(CustomRejection::FieldTooLarge(name)));
}
}
for (field, name) in &[(&stdout, "stdout"), (&stderr, "stderr")] {
if let Some(field) = field {
if field.len() > 1_000_000 {
Err(warp::reject::custom(CustomRejection::FieldTooLarge(name)))?;
return Err(warp::reject::custom(CustomRejection::FieldTooLarge(name)));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment