Commit cc5579dd authored by Konrad Borowski's avatar Konrad Borowski

Merge branch 'clippy-try-err' into 'master'

Resolve clippy::try_err warnings

See merge request pastebin.run/server!84
parents a8ee8373 69920c31
Pipeline #99057067 passed with stages
in 21 minutes and 25 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