src/helpers.rs in faster_path-0.3.8 vs src/helpers.rs in faster_path-0.3.9
- old
+ new
@@ -9,16 +9,19 @@
type Error;
fn try_from(value: T) -> Result<Self, Self::Error>;
}
+#[cfg(windows)]
#[inline]
pub fn is_same_path(a: &str, b: &str) -> bool {
- if cfg!(windows) {
- a.to_uppercase() == b.to_uppercase()
- } else {
- a == b
- }
+ a.to_uppercase() == b.to_uppercase()
+}
+
+#[cfg(not(windows))]
+#[inline]
+pub fn is_same_path(a: &str, b: &str) -> bool {
+ a == b
}
pub fn anyobject_to_string(item: AnyObject) -> Result<String, RubyDebugInfo> {
let result = &item;
if Class::from_existing("String").case_equals(result) {