blob: c943fbd472005d2fb93dc211ef99812f085b9348 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
https://github.com/stanislav-tkach/os_info/commit/3147a6125e48
error[E0308]: mismatched types
--> cargo-crates/os_info-3.8.1/src/freebsd/mod.rs:28:9
|
27 | match uname("-s").as_deref() {
| ---------------------- this expression has type `std::option::Option<&str>`
28 | "MidnightBSD" => Type::MidnightBSD,
| ^^^^^^^^^^^^^ expected `Option<&str>`, found `&str`
|
= note: expected enum `std::option::Option<&str>`
found reference `&'static str`
help: try wrapping the pattern in `Some`
|
28 | Some("MidnightBSD") => Type::MidnightBSD,
| +++++ +
error[E0308]: mismatched types
--> cargo-crates/os_info-3.8.1/src/freebsd/mod.rs:29:9
|
27 | match uname("-s").as_deref() {
| ---------------------- this expression has type `std::option::Option<&str>`
28 | "MidnightBSD" => Type::MidnightBSD,
29 | "FreeBSD" => {
| ^^^^^^^^^ expected `Option<&str>`, found `&str`
|
= note: expected enum `std::option::Option<&str>`
found reference `&'static str`
help: try wrapping the pattern in `Some`
|
29 | Some("FreeBSD") => {
| +++++ +
--- cargo-crates/os_info-3.8.1/src/freebsd/mod.rs.orig 2006-07-24 01:21:28 UTC
+++ cargo-crates/os_info-3.8.1/src/freebsd/mod.rs
@@ -25,8 +25,8 @@ fn get_os() -> Type {
fn get_os() -> Type {
match uname("-s").as_deref() {
- "MidnightBSD" => Type::MidnightBSD,
- "FreeBSD" => {
+ Some("MidnightBSD") => Type::MidnightBSD,
+ Some("FreeBSD") => {
let check_hardening = match Command::new("/sbin/sysctl")
.arg("hardening.version")
.output()
|