From 727907f8298682cee1d9219042a2a79c47b5a742 Mon Sep 17 00:00:00 2001 From: ssrlive <30760636+ssrlive@users.noreply.github.com> Date: Sat, 31 Aug 2024 12:57:35 +0800 Subject: [PATCH] Bump version 0.7.2 --- README.md | 11 +++++------ src/util.rs | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ee5495d..c163663 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,7 @@ Then either call [`Adapter::create`] or [`Adapter::open`] to obtain a wintun adapter. Start a session with [`Adapter::start_session`]. ## Example -```rust -use std::sync::Arc; +```rust, no_run //Must be run as Administrator because we create network adapters //Load the wintun dll file so that we can call the underlying C functions @@ -58,7 +57,7 @@ session.send_packet(packet); //Stop any readers blocking for data on other threads //Only needed when a blocking reader is preventing shutdown Ie. it holds an Arc to the //session, blocking it from being dropped -session.shutdown(); +let _ = session.shutdown(); //the session is stopped on drop //drop(session); @@ -73,8 +72,8 @@ file. ## Features - `panic_on_unsent_packets`: Panics if a send packet is dropped without being sent. Useful for -debugging packet issues because unsent packets that are dropped without being sent hold up -wintun's internal ring buffer. + debugging packet issues because unsent packets that are dropped without being sent hold up + wintun's internal ring buffer. - `verify_binary_signature`: Verifies the signature of the wintun dll file before loading it. @@ -85,7 +84,7 @@ wintun's internal ring buffer. wintun-bindings = { version = "0.7", features = ["async"] } ``` And simply transform your `Session` into an `AsyncSession`: - ```rust + ```rust, ignore // ... let session = adapter.start_session(MAX_RING_CAPACITY)?; let mut reader_session = AsyncSession::from(session.clone()); diff --git a/src/util.rs b/src/util.rs index f4f7801..d2b9798 100644 --- a/src/util.rs +++ b/src/util.rs @@ -352,6 +352,7 @@ fn MAKELANGID(p: u32, s: u32) -> u32 { } /// Returns a a human readable error message from a windows error code +#[doc(hidden)] pub fn format_message(error_code: u32) -> Result { let buf: *mut u16 = std::ptr::null_mut();