epel10
imports/epel10/rust-hostname-0.3.1-13.el10
parent
35d187eb70
commit
d1124720f4
@ -0,0 +1,49 @@
|
||||
From 3976c5bac1a5e7a4e9e0b8b12d8695ec6f8f00fb Mon Sep 17 00:00:00 2001
|
||||
From: Fabio Valentini <decathorpe@gmail.com>
|
||||
Date: Sun, 22 Sep 2024 01:47:58 +0200
|
||||
Subject: [PATCH] port from match_cfg to cfg-if
|
||||
|
||||
---
|
||||
src/lib.rs | 12 +++++-------
|
||||
1 file changed, 5 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/lib.rs b/src/lib.rs
|
||||
index 1a817b3..7ac8fef 100644
|
||||
--- a/src/lib.rs
|
||||
+++ b/src/lib.rs
|
||||
@@ -57,27 +57,25 @@ println!("{:?}", name);
|
||||
#![allow(unknown_lints, unused_extern_crates)]
|
||||
|
||||
#[macro_use]
|
||||
-extern crate match_cfg;
|
||||
+extern crate cfg_if;
|
||||
|
||||
#[cfg(feature = "set")]
|
||||
use std::ffi::OsStr;
|
||||
use std::ffi::OsString;
|
||||
use std::io;
|
||||
|
||||
-match_cfg! {
|
||||
- #[cfg(any(unix, target_os = "redox"))] => {
|
||||
+cfg_if! {
|
||||
+ if #[cfg(any(unix, target_os = "redox"))] {
|
||||
extern crate libc;
|
||||
|
||||
mod nix;
|
||||
use ::nix as sys;
|
||||
- }
|
||||
- #[cfg(target_os = "windows")] => {
|
||||
+ } else if #[cfg(target_os = "windows")] {
|
||||
extern crate winapi;
|
||||
|
||||
mod windows;
|
||||
use ::windows as sys;
|
||||
- }
|
||||
- _ => {
|
||||
+ } else {
|
||||
compile_error!("Unsupported target OS! Create an issue: https://github.com/svartalf/hostname/issues/new");
|
||||
}
|
||||
}
|
||||
--
|
||||
2.46.1
|
||||
|
@ -1,9 +1,10 @@
|
||||
--- hostname-0.3.1/Cargo.toml 2020-02-28T16:58:01+00:00
|
||||
+++ hostname-0.3.1/Cargo.toml 2023-05-17T09:32:55.784973+00:00
|
||||
@@ -33,6 +33,3 @@
|
||||
+++ hostname-0.3.1/Cargo.toml 2024-09-21T23:41:05.031544+00:00
|
||||
@@ -33,6 +33,4 @@
|
||||
set = []
|
||||
[target."cfg(any(unix, target_os = \"redox\"))".dependencies.libc]
|
||||
version = "^0.2"
|
||||
-[target."cfg(target_os = \"windows\")".dependencies.winapi]
|
||||
-version = "^0.3"
|
||||
-features = ["sysinfoapi"]
|
||||
+
|
||||
|
@ -0,0 +1,16 @@
|
||||
--- hostname-0.3.1/Cargo.toml 2020-02-28T16:58:01+00:00
|
||||
+++ hostname-0.3.1/Cargo.toml 2024-09-21T23:41:28.498611+00:00
|
||||
@@ -23,10 +23,10 @@
|
||||
[package.metadata.docs.rs]
|
||||
features = ["set"]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
-[dependencies.match_cfg]
|
||||
-version = "^0.1"
|
||||
+[dependencies.cfg-if]
|
||||
+version = "^1.0"
|
||||
[dev-dependencies.version-sync]
|
||||
-version = "0.8"
|
||||
+version = "0.9"
|
||||
|
||||
[features]
|
||||
default = []
|
Loading…
Reference in new issue