mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-05 13:57: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]
|
#[inline]
|
||||||
fn try_from(value: &[u8]) -> Result<Self, Self::Error> {
|
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)))
|
Ok(ByteString(Bytes::copy_from_slice(value)))
|
||||||
} else {
|
} else {
|
||||||
Err(())
|
Err(())
|
||||||
|
|
|
@ -11,7 +11,7 @@ mod tree;
|
||||||
pub use self::de::PathDeserializer;
|
pub use self::de::PathDeserializer;
|
||||||
pub use self::path::{Path, PathIter};
|
pub use self::path::{Path, PathIter};
|
||||||
pub use self::resource::ResourceDef;
|
pub use self::resource::ResourceDef;
|
||||||
pub use self::router::{Router, RouterBuilder};
|
pub use self::router::{ResourceId, Router, RouterBuilder};
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub struct ResourceInfo;
|
pub struct ResourceInfo;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
use super::tree::Tree;
|
use super::tree::Tree;
|
||||||
use super::{IntoPattern, Resource, ResourceDef, ResourcePath};
|
use super::{IntoPattern, Resource, ResourceDef, ResourcePath};
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
pub struct ResourceId(pub u16);
|
pub struct ResourceId(pub(crate) u16);
|
||||||
|
|
||||||
/// Resource router.
|
/// Resource router.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue