Loading openssl-errors/tests/test.rs +3 −3 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ fn basic() { assert_eq!(error.reason().unwrap(), "out of milk"); // Replace Windows `\` separators with `/` assert_eq!( error.file().replace(r"\", "/"), error.file().replace('\\', "/"), "openssl-errors/tests/test.rs" ); assert_eq!(error.line(), line!() - 11); Loading @@ -49,7 +49,7 @@ fn static_data() { assert_eq!(error.reason().unwrap(), "out of bacon"); // Replace Windows `\` separators with `/` assert_eq!( error.file().replace(r"\", "/"), error.file().replace('\\', "/"), "openssl-errors/tests/test.rs" ); assert_eq!(error.line(), line!() - 11); Loading @@ -66,7 +66,7 @@ fn dynamic_data() { assert_eq!(error.reason().unwrap(), "out of milk"); // Replace Windows `\` separators with `/` assert_eq!( error.file().replace(r"\", "/"), error.file().replace('\\', "/"), "openssl-errors/tests/test.rs" ); assert_eq!(error.line(), line!() - 11); Loading openssl-sys/build/main.rs +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ fn env_inner(name: &str) -> Option<OsString> { } fn env(name: &str) -> Option<OsString> { let prefix = env::var("TARGET").unwrap().to_uppercase().replace("-", "_"); let prefix = env::var("TARGET").unwrap().to_uppercase().replace('-', "_"); let prefixed = format!("{}_{}", prefix, name); env_inner(&prefixed).or_else(|| env_inner(name)) } Loading openssl-sys/src/err.rs +3 −3 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ cfg_if! { pub const fn ERR_GET_LIB(errcode: c_ulong) -> c_int { // hacks since `if` isn't yet stable in const functions :( ((ERR_LIB_SYS as c_ulong * (ERR_SYSTEM_ERROR(errcode) as c_ulong)) | (((errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK)) * (!ERR_SYSTEM_ERROR(errcode) as c_ulong)) as c_int (((errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK) * (!ERR_SYSTEM_ERROR(errcode) as c_ulong))) as c_int } pub const fn ERR_GET_FUNC(_errcode: c_ulong) -> c_int { Loading @@ -38,12 +38,12 @@ cfg_if! { pub const fn ERR_GET_REASON(errcode: c_ulong) -> c_int { // hacks since `if` isn't yet stable in const functions :( ((ERR_LIB_SYS as c_ulong * (ERR_SYSTEM_ERROR(errcode) as c_ulong)) | ((errcode & ERR_REASON_MASK)) * (!ERR_SYSTEM_ERROR(errcode) as c_ulong)) as c_int ((errcode & ERR_REASON_MASK) * (!ERR_SYSTEM_ERROR(errcode) as c_ulong))) as c_int } pub const fn ERR_PACK(lib: c_int, _func: c_int, reason: c_int) -> c_ulong { ((lib as c_ulong & ERR_LIB_MASK) << ERR_LIB_OFFSET) | ((reason as c_ulong & ERR_REASON_MASK)) (reason as c_ulong & ERR_REASON_MASK) } } } else { Loading Loading
openssl-errors/tests/test.rs +3 −3 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ fn basic() { assert_eq!(error.reason().unwrap(), "out of milk"); // Replace Windows `\` separators with `/` assert_eq!( error.file().replace(r"\", "/"), error.file().replace('\\', "/"), "openssl-errors/tests/test.rs" ); assert_eq!(error.line(), line!() - 11); Loading @@ -49,7 +49,7 @@ fn static_data() { assert_eq!(error.reason().unwrap(), "out of bacon"); // Replace Windows `\` separators with `/` assert_eq!( error.file().replace(r"\", "/"), error.file().replace('\\', "/"), "openssl-errors/tests/test.rs" ); assert_eq!(error.line(), line!() - 11); Loading @@ -66,7 +66,7 @@ fn dynamic_data() { assert_eq!(error.reason().unwrap(), "out of milk"); // Replace Windows `\` separators with `/` assert_eq!( error.file().replace(r"\", "/"), error.file().replace('\\', "/"), "openssl-errors/tests/test.rs" ); assert_eq!(error.line(), line!() - 11); Loading
openssl-sys/build/main.rs +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ fn env_inner(name: &str) -> Option<OsString> { } fn env(name: &str) -> Option<OsString> { let prefix = env::var("TARGET").unwrap().to_uppercase().replace("-", "_"); let prefix = env::var("TARGET").unwrap().to_uppercase().replace('-', "_"); let prefixed = format!("{}_{}", prefix, name); env_inner(&prefixed).or_else(|| env_inner(name)) } Loading
openssl-sys/src/err.rs +3 −3 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ cfg_if! { pub const fn ERR_GET_LIB(errcode: c_ulong) -> c_int { // hacks since `if` isn't yet stable in const functions :( ((ERR_LIB_SYS as c_ulong * (ERR_SYSTEM_ERROR(errcode) as c_ulong)) | (((errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK)) * (!ERR_SYSTEM_ERROR(errcode) as c_ulong)) as c_int (((errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK) * (!ERR_SYSTEM_ERROR(errcode) as c_ulong))) as c_int } pub const fn ERR_GET_FUNC(_errcode: c_ulong) -> c_int { Loading @@ -38,12 +38,12 @@ cfg_if! { pub const fn ERR_GET_REASON(errcode: c_ulong) -> c_int { // hacks since `if` isn't yet stable in const functions :( ((ERR_LIB_SYS as c_ulong * (ERR_SYSTEM_ERROR(errcode) as c_ulong)) | ((errcode & ERR_REASON_MASK)) * (!ERR_SYSTEM_ERROR(errcode) as c_ulong)) as c_int ((errcode & ERR_REASON_MASK) * (!ERR_SYSTEM_ERROR(errcode) as c_ulong))) as c_int } pub const fn ERR_PACK(lib: c_int, _func: c_int, reason: c_int) -> c_ulong { ((lib as c_ulong & ERR_LIB_MASK) << ERR_LIB_OFFSET) | ((reason as c_ulong & ERR_REASON_MASK)) (reason as c_ulong & ERR_REASON_MASK) } } } else { Loading