mirror of https://github.com/rwf2/Rocket.git
Fix 'Segments::to_path_buf()' on Windows.
This commit is contained in:
parent
82cd53de36
commit
2a7eac01bb
|
@ -215,12 +215,10 @@ impl<'a> Segments<'a, Path> {
|
|||
return Err(PathError::BadEnd('<'))
|
||||
} else if segment.contains('/') {
|
||||
return Err(PathError::BadChar('/'))
|
||||
} else if cfg!(windows) {
|
||||
if segment.contains('\\') {
|
||||
return Err(PathError::BadChar('\\'))
|
||||
} else if segment.contains(':') {
|
||||
return Err(PathError::BadChar(':'))
|
||||
}
|
||||
} else if cfg!(windows) && segment.contains('\\') {
|
||||
return Err(PathError::BadChar('\\'))
|
||||
} else if cfg!(windows) && segment.contains(':') {
|
||||
return Err(PathError::BadChar(':'))
|
||||
} else {
|
||||
buf.push(&*segment)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue