Minor cleanup.
Suggested by clippy.
This commit is contained in:
parent
85c7a32978
commit
f5bc9d7e98
@ -43,8 +43,10 @@ fn gzipped(data: &[u8]) -> Result<Vec<u8>, Error> {
|
||||
|
||||
fn brcompressed(data: &[u8]) -> Result<Vec<u8>, Error> {
|
||||
let mut buf = Vec::new();
|
||||
let mut params = BrotliEncoderParams::default();
|
||||
params.quality = 11;
|
||||
let params = BrotliEncoderParams {
|
||||
quality: 11,
|
||||
..Default::default()
|
||||
};
|
||||
BrotliCompress(&mut data.as_ref(), &mut buf, ¶ms)?;
|
||||
Ok(buf)
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ impl GlobalContext {
|
||||
.ok_or_else(|| "User missing in jwt claims".to_string())
|
||||
}
|
||||
fn cache(&self) -> Result<PooledMemcache, Error> {
|
||||
Ok(self.memcache_pool.get()?)
|
||||
self.memcache_pool.get()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,9 +36,9 @@ impl UrlString {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<String> for UrlString {
|
||||
fn into(self) -> String {
|
||||
self.value
|
||||
impl From<UrlString> for String {
|
||||
fn from(url: UrlString) -> String {
|
||||
url.value
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user