Clean up code a bit

This commit is contained in:
Jordan Johnson-Doyle 2019-02-11 10:47:12 +00:00
parent 9d4b3ecafc
commit 7b9062aa21
No known key found for this signature in database
GPG key ID: A95F87B578CE79B6
2 changed files with 4 additions and 4 deletions

View file

@ -40,6 +40,6 @@ pub fn store_paste(content: String) -> String {
}
/// Get a paste by id. Returns `None` if the paste doesn't exist.
pub fn get_paste<'a>(id: &str) -> Option<String> {
ENTRIES.read().unwrap().get(id).map(|f| f.clone())
pub fn get_paste(id: &str) -> Option<String> {
ENTRIES.read().unwrap().get(id).cloned()
}