aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Walters <rwalters@digitalstirling.com>2020-10-13 12:46:34 -0700
committerRichard Walters <rwalters@digitalstirling.com>2020-10-13 12:46:34 -0700
commite7cdb4879610527ba00e92208625394e2835948d (patch)
tree7ebbd6debcbdbb489ef0ff1d65a542ab8c7dd61a
parent8edd5683ceb4d03e40658aef5a38d134a67adff4 (diff)
Sort functions by alphabetical order
-rw-r--r--src/uri.rs32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/uri.rs b/src/uri.rs
index 1c6b364..6520e46 100644
--- a/src/uri.rs
+++ b/src/uri.rs
@@ -31,6 +31,22 @@ impl Uri {
self.authority.as_ref()
}
+ fn can_navigate_path_up_one_level<T>(path: T) -> bool
+ where T: AsRef<[Vec<u8>]>
+ {
+ let path = path.as_ref();
+ match path.first() {
+ // First segment empty means path has leading slash,
+ // so we can only navigate up if there are two or more segments.
+ Some(segment) if segment.is_empty() => path.len() > 1,
+
+ // Otherwise, we can navigate up as long as there is at least one
+ // segment.
+ Some(_) => true,
+ None => false
+ }
+ }
+
fn check_scheme<T>(scheme: T) -> Result<T, Error>
where T: AsRef<str>
{
@@ -60,22 +76,6 @@ impl Uri {
!Self::is_path_absolute(&self.path)
}
- fn can_navigate_path_up_one_level<T>(path: T) -> bool
- where T: AsRef<[Vec<u8>]>
- {
- let path = path.as_ref();
- match path.first() {
- // First segment empty means path has leading slash,
- // so we can only navigate up if there are two or more segments.
- Some(segment) if segment.is_empty() => path.len() > 1,
-
- // Otherwise, we can navigate up as long as there is at least one
- // segment.
- Some(_) => true,
- None => false
- }
- }
-
fn decode_query_or_fragment<T>(
query_or_fragment: T,
context: Context,