fix a few warnings when checking with all features

This commit is contained in:
Evan Almloff committed 2024-02-16 09:09:35 -06:00
1 parent 0ef29b7d75
commit 6879507652
3 files changed
+1 -42

No files matched your search

-16
View File
@@ -289,17 +289,9 @@ pub trait HistoryProvider<R: Routable> {
pub(crate) trait AnyHistoryProvider {
fn parse_route(&self, route: &str) -> Result<Rc<dyn Any>, String>;
#[must_use]
fn accepts_type_id(&self, type_id: &std::any::TypeId) -> bool;
#[must_use]
fn current_route(&self) -> Rc<dyn Any>;
#[must_use]
fn current_prefix(&self) -> Option<String> {
None
}
#[must_use]
fn can_go_back(&self) -> bool {
true
@@ -359,19 +351,11 @@ where
.map(|route| Rc::new(route) as Rc<dyn Any>)
}
fn accepts_type_id(&self, type_id: &std::any::TypeId) -> bool {
type_id == &std::any::TypeId::of::<R>()
}
fn current_route(&self) -> Rc<dyn Any> {
let route = self.inner.current_route();
Rc::new(route)
}
fn current_prefix(&self) -> Option<String> {
self.inner.current_prefix()
}
fn can_go_back(&self) -> bool {
self.inner.can_go_back()
}