1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-30 08:38:16 +02:00

added external resources; refactor route recognizer

This commit is contained in:
Nikolay Kim
2017-12-07 16:22:26 -08:00
parent 9e3aa59155
commit 968f5d39d6
11 changed files with 686 additions and 369 deletions

View File

@@ -59,8 +59,8 @@ impl<S> Resource<S> {
self.name = name.into();
}
pub(crate) fn get_name(&self) -> Option<String> {
if self.name.is_empty() { None } else { Some(self.name.clone()) }
pub(crate) fn get_name(&self) -> &str {
&self.name
}
}