mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-03 04:47:39 +03:00
clippy
This commit is contained in:
parent
e9bbe84cba
commit
b2fd0ee3ac
3 changed files with 4 additions and 4 deletions
|
@ -217,7 +217,7 @@ impl TryFrom<&[u8]> for ByteString {
|
|||
|
||||
#[inline]
|
||||
fn try_from(value: &[u8]) -> Result<Self, Self::Error> {
|
||||
if utf8::is_valid(&value) {
|
||||
if utf8::is_valid(value) {
|
||||
Ok(ByteString(Bytes::copy_from_slice(value)))
|
||||
} else {
|
||||
Err(())
|
||||
|
|
|
@ -11,7 +11,7 @@ mod tree;
|
|||
pub use self::de::PathDeserializer;
|
||||
pub use self::path::{Path, PathIter};
|
||||
pub use self::resource::ResourceDef;
|
||||
pub use self::router::{Router, RouterBuilder};
|
||||
pub use self::router::{ResourceId, Router, RouterBuilder};
|
||||
|
||||
#[doc(hidden)]
|
||||
pub struct ResourceInfo;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use super::tree::Tree;
|
||||
use super::{IntoPattern, Resource, ResourceDef, ResourcePath};
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
pub struct ResourceId(pub u16);
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct ResourceId(pub(crate) u16);
|
||||
|
||||
/// Resource router.
|
||||
#[derive(Clone)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue