tangled
alpha
login
or
join now
ericwood.org
/
photos-site
1
fork
atom
A little app to serve my photography from my personal website
1
fork
atom
overview
issues
pulls
pipelines
use better rust idioms
ericwood.org
2 months ago
eb3e53b5
1e85147a
0/0
Waiting for spindle ...
+2
-4
1 changed file
expand all
collapse all
unified
split
src
blog.rs
+2
-4
src/blog.rs
reviewed
···
82
82
}
83
83
84
84
pub fn get_by_slug(&self, slug: &str) -> Option<Arc<BlogPost>> {
85
85
-
self.by_slug.get(slug).map(|i| (*i).clone())
85
85
+
self.by_slug.get(slug).cloned()
86
86
}
87
87
88
88
pub fn get_by_tag(&self, tag: &str) -> Vec<Arc<BlogPost>> {
89
89
self.by_tag
90
90
.get(tag)
91
91
.unwrap_or(&Vec::<Arc<BlogPost>>::new())
92
92
-
.iter()
93
93
-
.map(|i| (*i).clone())
94
94
-
.collect()
92
92
+
.to_vec()
95
93
}
96
94
}
97
95