commit
b0a68e7c3c
@ -0,0 +1,31 @@
|
||||
From a09c71a8c1a4fcf992606dedc65cd2a50e90fdee Mon Sep 17 00:00:00 2001
|
||||
From: Fabio Valentini <decathorpe@gmail.com>
|
||||
Date: Sun, 23 Jul 2023 22:56:50 +0200
|
||||
Subject: [PATCH] Fix compiling net::udp::UdpSocket doctest with Rust 1.71
|
||||
|
||||
With Rust 1.71 this doctest fails to compile because of a new
|
||||
`dropping_copy_types` warning, which is elevated to a hard
|
||||
error because of "deny(warnings)".
|
||||
|
||||
This PR changes the doctest from calling "drop(buffer)"
|
||||
to using the "assign to underscore to drop" trick.
|
||||
---
|
||||
src/net/udp.rs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/net/udp.rs b/src/net/udp.rs
|
||||
index c5c3ba9..a750da1 100644
|
||||
--- a/src/net/udp.rs
|
||||
+++ b/src/net/udp.rs
|
||||
@@ -79,7 +79,7 @@ use std::os::windows::io::{AsRawSocket, FromRawSocket, IntoRawSocket, RawSocket}
|
||||
/// let num_recv = echoer_socket.recv(&mut buffer)?;
|
||||
/// println!("echo {:?} -> {:?}", buffer, num_recv);
|
||||
/// buffer = [0; 9];
|
||||
-/// # drop(buffer); // Silence unused assignment warning.
|
||||
+/// # let _ = buffer; // Silence unused assignment warning.
|
||||
/// # return Ok(());
|
||||
/// }
|
||||
/// _ => unreachable!()
|
||||
--
|
||||
2.41.0
|
||||
|
Binary file not shown.
@ -0,0 +1,15 @@
|
||||
--- mio-0.7.14/Cargo.toml 1970-01-01T00:00:01+00:00
|
||||
+++ mio-0.7.14/Cargo.toml 2023-06-14T15:22:23.250246+00:00
|
||||
@@ -60,12 +60,3 @@
|
||||
uds = ["net"]
|
||||
[target."cfg(unix)".dependencies.libc]
|
||||
version = "0.2.86"
|
||||
-[target."cfg(windows)".dependencies.miow]
|
||||
-version = "0.3.6"
|
||||
-
|
||||
-[target."cfg(windows)".dependencies.ntapi]
|
||||
-version = "0.3"
|
||||
-
|
||||
-[target."cfg(windows)".dependencies.winapi]
|
||||
-version = "0.3"
|
||||
-features = ["winsock2", "mswsock", "mstcpip"]
|
@ -0,0 +1,210 @@
|
||||
## START: Set by rpmautospec
|
||||
## (rpmautospec version 0.3.5)
|
||||
## RPMAUTOSPEC: autorelease, autochangelog
|
||||
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
||||
release_number = 6;
|
||||
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
||||
print(release_number + base_release_number - 1);
|
||||
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
||||
## END: Set by rpmautospec
|
||||
|
||||
# Generated by rust2rpm 24
|
||||
%bcond_without check
|
||||
%global debug_package %{nil}
|
||||
|
||||
%global crate mio
|
||||
|
||||
Name: rust-mio0.7
|
||||
Version: 0.7.14
|
||||
Release: %autorelease
|
||||
Summary: Lightweight non-blocking IO
|
||||
|
||||
License: MIT
|
||||
URL: https://crates.io/crates/mio
|
||||
Source: %{crates_source}
|
||||
# Automatically generated patch to strip foreign dependencies
|
||||
Patch: mio-fix-metadata-auto.diff
|
||||
# https://github.com/tokio-rs/mio/pull/1693
|
||||
Patch: 0001-Fix-compiling-net-udp-UdpSocket-doctest-with-Rust-1..patch
|
||||
|
||||
BuildRequires: rust-packaging >= 21
|
||||
|
||||
%global _description %{expand:
|
||||
Lightweight non-blocking IO.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%package devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "%{crate}" crate.
|
||||
|
||||
%files devel
|
||||
%license %{crate_instdir}/LICENSE
|
||||
%doc %{crate_instdir}/CHANGELOG.md
|
||||
%doc %{crate_instdir}/README.md
|
||||
%{crate_instdir}/
|
||||
|
||||
%package -n %{name}+default-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+default-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "default" feature of the "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+default-devel
|
||||
%ghost %{crate_instdir}/Cargo.toml
|
||||
|
||||
%package -n %{name}+extra-docs-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+extra-docs-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "extra-docs" feature of the "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+extra-docs-devel
|
||||
%ghost %{crate_instdir}/Cargo.toml
|
||||
|
||||
%package -n %{name}+net-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+net-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "net" feature of the "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+net-devel
|
||||
%ghost %{crate_instdir}/Cargo.toml
|
||||
|
||||
%package -n %{name}+os-ext-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+os-ext-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "os-ext" feature of the "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+os-ext-devel
|
||||
%ghost %{crate_instdir}/Cargo.toml
|
||||
|
||||
%package -n %{name}+os-poll-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+os-poll-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "os-poll" feature of the "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+os-poll-devel
|
||||
%ghost %{crate_instdir}/Cargo.toml
|
||||
|
||||
%package -n %{name}+os-util-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+os-util-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "os-util" feature of the "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+os-util-devel
|
||||
%ghost %{crate_instdir}/Cargo.toml
|
||||
|
||||
%package -n %{name}+pipe-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+pipe-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "pipe" feature of the "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+pipe-devel
|
||||
%ghost %{crate_instdir}/Cargo.toml
|
||||
|
||||
%package -n %{name}+tcp-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+tcp-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "tcp" feature of the "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+tcp-devel
|
||||
%ghost %{crate_instdir}/Cargo.toml
|
||||
|
||||
%package -n %{name}+udp-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+udp-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "udp" feature of the "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+udp-devel
|
||||
%ghost %{crate_instdir}/Cargo.toml
|
||||
|
||||
%package -n %{name}+uds-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+uds-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "uds" feature of the "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+uds-devel
|
||||
%ghost %{crate_instdir}/Cargo.toml
|
||||
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
||||
%cargo_prep
|
||||
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires -a
|
||||
|
||||
%build
|
||||
%cargo_build -a
|
||||
|
||||
%install
|
||||
%cargo_install -a
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
%cargo_test -a
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Jan 15 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.7.14-6
|
||||
- Rebuilt for MSVSphere 9.3
|
||||
|
||||
* Sun Jul 23 2023 Fabio Valentini <decathorpe@gmail.com> - 0.7.14-6
|
||||
- Fix compiling net::udp::UdpSocket doctest with Rust 1.71
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.14-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Wed Jun 14 2023 Fabio Valentini <decathorpe@gmail.com> - 0.7.14-4
|
||||
- Regenerate with rust2rpm v24
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.14-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.14-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Thu Feb 03 2022 Fabio Valentini <decathorpe@gmail.com> - 0.7.14-1
|
||||
- Initial import (mio 0.7 compat package)
|
Loading…
Reference in new issue