Update src/server.rs

Co-authored-by: Matthew E <matt@matthew.science>
This commit is contained in:
Daniel Valentine 2022-11-03 21:41:26 -06:00 committed by GitHub
parent 5dd6e0aad4
commit 8b5bbce191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 8 deletions

View File

@ -67,14 +67,11 @@ impl CompressionType {
impl ToString for CompressionType {
fn to_string(&self) -> String {
let s: &str = match *self {
CompressionType::Gzip => "gzip",
CompressionType::Brotli => "br",
_ => "",
};
s.to_string()
match self {
CompressionType::Gzip => "gzip".to_string(),
CompressionType::Brotli => "br".to_string(),
_ => String::new(),
}
}
}