html-to-markdown 2.27.2 → 2.27.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -8
- data/ext/html-to-markdown-rb/native/Cargo.toml +1 -1
- data/lib/html_to_markdown/version.rb +1 -1
- data/rust-vendor/getrandom/.cargo-checksum.json +1 -1
- data/rust-vendor/getrandom/.cargo_vcs_info.json +1 -1
- data/rust-vendor/getrandom/CHANGELOG.md +62 -43
- data/rust-vendor/getrandom/Cargo.lock +49 -56
- data/rust-vendor/getrandom/Cargo.toml +2 -2
- data/rust-vendor/getrandom/Cargo.toml.orig +2 -2
- data/rust-vendor/getrandom/src/backends/efi_rng.rs +8 -10
- data/rust-vendor/getrandom/src/backends/getentropy.rs +13 -4
- data/rust-vendor/getrandom/src/backends/linux_android_with_fallback.rs +10 -25
- data/rust-vendor/getrandom/src/backends/netbsd.rs +17 -25
- data/rust-vendor/getrandom/src/backends/rdrand.rs +15 -9
- data/rust-vendor/getrandom/src/backends/rndr.rs +2 -1
- data/rust-vendor/getrandom/src/backends/vxworks.rs +7 -3
- data/rust-vendor/getrandom/src/backends/windows.rs +21 -5
- data/rust-vendor/getrandom/src/utils/lazy_bool.rs +39 -0
- data/rust-vendor/getrandom/src/utils/lazy_ptr.rs +57 -0
- data/rust-vendor/html-to-markdown-rs/Cargo.toml +2 -2
- data/rust-vendor/html-to-markdown-rs/src/converter/text_node.rs +2 -1
- data/rust-vendor/html-to-markdown-rs/tests/issue_216_217_regressions.rs +82 -0
- data/rust-vendor/quote/.cargo-checksum.json +1 -1
- data/rust-vendor/quote/.cargo_vcs_info.json +1 -1
- data/rust-vendor/quote/.github/workflows/ci.yml +2 -2
- data/rust-vendor/quote/Cargo.lock +21 -21
- data/rust-vendor/quote/Cargo.toml +2 -2
- data/rust-vendor/quote/Cargo.toml.orig +2 -2
- data/rust-vendor/quote/README.md +0 -1
- data/rust-vendor/quote/src/lib.rs +1 -1
- data/rust-vendor/quote/src/to_tokens.rs +7 -0
- data/rust-vendor/quote/tests/ui/not-quotable.stderr +1 -1
- data/rust-vendor/quote/tests/ui/not-repeatable.stderr +3 -11
- data/rust-vendor/r-efi/.cargo-checksum.json +1 -1
- data/rust-vendor/r-efi/.cargo_vcs_info.json +1 -1
- data/rust-vendor/r-efi/AUTHORS +1 -0
- data/rust-vendor/r-efi/Cargo.lock +1 -1
- data/rust-vendor/r-efi/Cargo.toml +1 -3
- data/rust-vendor/r-efi/Cargo.toml.orig +1 -5
- data/rust-vendor/r-efi/NEWS.md +16 -0
- data/rust-vendor/r-efi/src/base.rs +1 -1
- data/rust-vendor/r-efi/src/lib.rs +27 -12
- data/rust-vendor/r-efi/src/protocols/absolute_pointer.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/block_io.rs +8 -8
- data/rust-vendor/r-efi/src/protocols/bus_specific_driver_override.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/debug_support.rs +10 -10
- data/rust-vendor/r-efi/src/protocols/debugport.rs +8 -8
- data/rust-vendor/r-efi/src/protocols/decompress.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/device_path_from_text.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/device_path_to_text.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/device_path_utilities.rs +16 -16
- data/rust-vendor/r-efi/src/protocols/disk_io.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/disk_io2.rs +8 -8
- data/rust-vendor/r-efi/src/protocols/driver_binding.rs +6 -6
- data/rust-vendor/r-efi/src/protocols/driver_diagnostics2.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/driver_family_override.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/file.rs +28 -28
- data/rust-vendor/r-efi/src/protocols/graphics_output.rs +6 -6
- data/rust-vendor/r-efi/src/protocols/hii_database.rs +24 -24
- data/rust-vendor/r-efi/src/protocols/hii_font.rs +8 -8
- data/rust-vendor/r-efi/src/protocols/hii_font_ex.rs +10 -10
- data/rust-vendor/r-efi/src/protocols/hii_string.rs +10 -10
- data/rust-vendor/r-efi/src/protocols/ip4.rs +16 -16
- data/rust-vendor/r-efi/src/protocols/ip6.rs +18 -18
- data/rust-vendor/r-efi/src/protocols/load_file.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/loaded_image.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/managed_network.rs +16 -16
- data/rust-vendor/r-efi/src/protocols/memory_attribute.rs +6 -6
- data/rust-vendor/r-efi/src/protocols/mp_services.rs +15 -15
- data/rust-vendor/r-efi/src/protocols/pci_io.rs +26 -26
- data/rust-vendor/r-efi/src/protocols/platform_driver_override.rs +6 -6
- data/rust-vendor/r-efi/src/protocols/rng.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/service_binding.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/shell.rs +81 -81
- data/rust-vendor/r-efi/src/protocols/shell_dynamic_command.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/simple_file_system.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/simple_network.rs +26 -26
- data/rust-vendor/r-efi/src/protocols/simple_text_input.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/simple_text_input_ex.rs +11 -11
- data/rust-vendor/r-efi/src/protocols/simple_text_output.rs +18 -18
- data/rust-vendor/r-efi/src/protocols/tcp4.rs +20 -20
- data/rust-vendor/r-efi/src/protocols/tcp6.rs +18 -18
- data/rust-vendor/r-efi/src/protocols/timestamp.rs +3 -3
- data/rust-vendor/r-efi/src/protocols/udp4.rs +16 -16
- data/rust-vendor/r-efi/src/protocols/udp6.rs +14 -14
- data/rust-vendor/r-efi/src/system.rs +115 -115
- data/rust-vendor/r-efi/src/vendor/intel/console_control.rs +6 -6
- data/rust-vendor/r-efi-5.3.0/.cargo-checksum.json +1 -0
- data/rust-vendor/r-efi-5.3.0/.cargo_vcs_info.json +6 -0
- data/rust-vendor/r-efi-5.3.0/.github/workflows/publish.yml +39 -0
- data/rust-vendor/r-efi-5.3.0/.github/workflows/rust-tests.yml +125 -0
- data/rust-vendor/r-efi-5.3.0/AUTHORS +74 -0
- data/rust-vendor/r-efi-5.3.0/Cargo.lock +16 -0
- data/rust-vendor/r-efi-5.3.0/Cargo.toml +70 -0
- data/rust-vendor/r-efi-5.3.0/Cargo.toml.orig +51 -0
- data/rust-vendor/r-efi-5.3.0/Makefile +85 -0
- data/rust-vendor/r-efi-5.3.0/NEWS.md +301 -0
- data/rust-vendor/r-efi-5.3.0/README.md +99 -0
- data/rust-vendor/r-efi-5.3.0/examples/freestanding.rs +34 -0
- data/rust-vendor/r-efi-5.3.0/examples/gop-query.rs +188 -0
- data/rust-vendor/r-efi-5.3.0/examples/hello-world.rs +55 -0
- data/rust-vendor/r-efi-5.3.0/src/base.rs +993 -0
- data/rust-vendor/r-efi-5.3.0/src/hii.rs +1300 -0
- data/rust-vendor/r-efi-5.3.0/src/lib.rs +182 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/absolute_pointer.rs +69 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/block_io.rs +70 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/bus_specific_driver_override.rs +32 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/debug_support.rs +835 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/debugport.rs +42 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/decompress.rs +37 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/device_path.rs +82 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/device_path_from_text.rs +26 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/device_path_to_text.rs +30 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/device_path_utilities.rs +63 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/disk_io.rs +40 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/disk_io2.rs +58 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/driver_binding.rs +42 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/driver_diagnostics2.rs +38 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/driver_family_override.rs +23 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/file.rs +183 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/graphics_output.rs +103 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_database.rs +299 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_font.rs +87 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_font_ex.rs +107 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_package_list.rs +14 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_string.rs +71 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/ip4.rs +202 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/ip6.rs +264 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/load_file.rs +26 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/load_file2.rs +15 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/loaded_image.rs +39 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/loaded_image_device_path.rs +13 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/managed_network.rs +147 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/memory_attribute.rs +40 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/mp_services.rs +121 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/pci_io.rs +203 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/platform_driver_override.rs +46 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/rng.rs +83 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/service_binding.rs +20 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/shell.rs +295 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/shell_dynamic_command.rs +33 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/shell_parameters.rs +23 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_file_system.rs +26 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_network.rs +196 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_text_input.rs +38 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_text_input_ex.rs +85 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_text_output.rs +86 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/tcp4.rs +224 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/tcp6.rs +202 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/timestamp.rs +32 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/udp4.rs +151 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/udp6.rs +137 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols.rs +54 -0
- data/rust-vendor/r-efi-5.3.0/src/system.rs +1130 -0
- data/rust-vendor/r-efi-5.3.0/src/vendor/intel/console_control.rs +37 -0
- data/rust-vendor/r-efi-5.3.0/src/vendor.rs +10 -0
- data/rust-vendor/tokio/.cargo-checksum.json +1 -1
- data/rust-vendor/tokio/.cargo_vcs_info.json +1 -1
- data/rust-vendor/tokio/CHANGELOG.md +94 -0
- data/rust-vendor/tokio/Cargo.lock +1549 -0
- data/rust-vendor/tokio/Cargo.toml +96 -83
- data/rust-vendor/tokio/Cargo.toml.orig +7 -7
- data/rust-vendor/tokio/README.md +1 -1
- data/rust-vendor/tokio/src/fs/open_options.rs +4 -1
- data/rust-vendor/tokio/src/fs/read.rs +4 -1
- data/rust-vendor/tokio/src/fs/write.rs +4 -1
- data/rust-vendor/tokio/src/io/async_write.rs +3 -4
- data/rust-vendor/tokio/src/io/poll_evented.rs +23 -1
- data/rust-vendor/tokio/src/io/stderr.rs +15 -1
- data/rust-vendor/tokio/src/io/stdout.rs +14 -0
- data/rust-vendor/tokio/src/io/util/async_write_ext.rs +2 -2
- data/rust-vendor/tokio/src/io/util/write_buf.rs +11 -2
- data/rust-vendor/tokio/src/lib.rs +12 -28
- data/rust-vendor/tokio/src/macros/select.rs +6 -8
- data/rust-vendor/tokio/src/net/tcp/socket.rs +25 -1
- data/rust-vendor/tokio/src/net/tcp/stream.rs +40 -1
- data/rust-vendor/tokio/src/process/unix/pidfd_reaper.rs +1 -41
- data/rust-vendor/tokio/src/runtime/blocking/pool.rs +18 -14
- data/rust-vendor/tokio/src/runtime/builder.rs +10 -4
- data/rust-vendor/tokio/src/runtime/handle.rs +3 -2
- data/rust-vendor/tokio/src/runtime/io/driver/uring.rs +49 -61
- data/rust-vendor/tokio/src/runtime/io/driver.rs +6 -5
- data/rust-vendor/tokio/src/runtime/mod.rs +20 -1
- data/rust-vendor/tokio/src/runtime/runtime.rs +71 -1
- data/rust-vendor/tokio/src/runtime/scheduler/current_thread/mod.rs +24 -8
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/worker.rs +5 -0
- data/rust-vendor/tokio/src/runtime/task/core.rs +1 -0
- data/rust-vendor/tokio/src/runtime/task/join.rs +7 -3
- data/rust-vendor/tokio/src/runtime/task/list.rs +5 -3
- data/rust-vendor/tokio/src/runtime/task/mod.rs +0 -5
- data/rust-vendor/tokio/src/runtime/tests/loom_blocking.rs +39 -1
- data/rust-vendor/tokio/src/signal/mod.rs +6 -17
- data/rust-vendor/tokio/src/signal/registry.rs +1 -1
- data/rust-vendor/tokio/src/signal/unix.rs +24 -44
- data/rust-vendor/tokio/src/signal/windows/sys.rs +52 -64
- data/rust-vendor/tokio/src/signal/windows.rs +35 -23
- data/rust-vendor/tokio/src/sync/mpsc/mod.rs +3 -1
- data/rust-vendor/tokio/src/sync/oneshot.rs +13 -0
- data/rust-vendor/tokio/src/sync/rwlock.rs +4 -5
- data/rust-vendor/tokio/src/sync/tests/loom_oneshot.rs +27 -1
- data/rust-vendor/tokio/src/task/blocking.rs +16 -1
- data/rust-vendor/tokio/src/task/builder.rs +2 -2
- data/rust-vendor/tokio/src/task/mod.rs +1 -1
- data/rust-vendor/tokio/src/task/spawn.rs +8 -3
- data/rust-vendor/tokio/src/task/yield_now.rs +13 -23
- data/rust-vendor/tokio/src/time/clock.rs +62 -0
- data/rust-vendor/tokio/src/util/memchr.rs +32 -4
- data/rust-vendor/tokio/src/util/sharded_list.rs +6 -4
- data/rust-vendor/tokio/tests/fs_link.rs +54 -0
- data/rust-vendor/tokio/tests/io_async_fd_memory_leak.rs +209 -0
- data/rust-vendor/tokio/tests/io_write_buf.rs +56 -0
- data/rust-vendor/tokio/tests/process_issue_7144.rs +8 -0
- data/rust-vendor/tokio/tests/rt_basic.rs +41 -0
- data/rust-vendor/tokio/tests/rt_common_before_park.rs +92 -0
- data/rust-vendor/tokio/tests/rt_metrics.rs +1 -1
- data/rust-vendor/tokio/tests/rt_panic.rs +12 -0
- data/rust-vendor/tokio/tests/rt_shutdown_err.rs +82 -0
- data/rust-vendor/tokio/tests/rt_threaded.rs +49 -1
- data/rust-vendor/tokio/tests/rt_unstable_metrics.rs +32 -0
- data/rust-vendor/tokio/tests/tcp_connect.rs +2 -3
- data/rust-vendor/tokio/tests/tcp_shutdown.rs +1 -3
- data/rust-vendor/tokio/tests/tcp_socket.rs +3 -4
- data/rust-vendor/tokio/tests/tcp_stream.rs +3 -0
- metadata +78 -3
- data/rust-vendor/getrandom/src/utils/lazy.rs +0 -64
|
@@ -49,9 +49,25 @@ const TRUE: BOOL = 1;
|
|
|
49
49
|
#[inline]
|
|
50
50
|
pub fn fill_inner(dest: &mut [MaybeUninit<u8>]) -> Result<(), Error> {
|
|
51
51
|
let result = unsafe { ProcessPrng(dest.as_mut_ptr().cast::<u8>(), dest.len()) };
|
|
52
|
-
// `ProcessPrng` is documented to always return
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
// On Windows 10 and later, `ProcessPrng` is documented to always return
|
|
53
|
+
// TRUE. All potential errors are handled during loading of
|
|
54
|
+
// `BCryptPrimitive.dll`. See the "Process base PRNG" section in the
|
|
55
|
+
// aforementioned Windows RNG whitepaper for more information.
|
|
56
|
+
//
|
|
57
|
+
// The Zig project found that Windows 8 implements `ProcessPrng` in a way
|
|
58
|
+
// that may fail and return a value other than `TRUE`. Although recent
|
|
59
|
+
// versions of the Rust toolchain do not support Windows 8, we cannot rule
|
|
60
|
+
// out this backend being used in an executable that will run on Windows 8
|
|
61
|
+
// (e.g. a fork of this crate backported to have an MSRV lower than 1.76,
|
|
62
|
+
// or a fork of the Rust toolchain to support older Windows versions, or
|
|
63
|
+
// other build hacks).
|
|
64
|
+
//
|
|
65
|
+
// Further, Wine's implementation of `ProcessPrng` CAN fail, in every
|
|
66
|
+
// version through Wine 11.2, and this may be the case for any other Windows
|
|
67
|
+
// emulation layers.
|
|
68
|
+
if result == TRUE {
|
|
69
|
+
Ok(())
|
|
70
|
+
} else {
|
|
71
|
+
Err(Error::UNEXPECTED)
|
|
72
|
+
}
|
|
57
73
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
use core::sync::atomic::{AtomicU8, Ordering::Relaxed};
|
|
2
|
+
|
|
3
|
+
/// Lazily caches a `bool` in an `AtomicU8`.
|
|
4
|
+
///
|
|
5
|
+
/// Initialization is intentionally unsynchronized: concurrent callers may race
|
|
6
|
+
/// and run `init` more than once. Once a value is produced, it is cached and
|
|
7
|
+
/// reused by subsequent calls.
|
|
8
|
+
///
|
|
9
|
+
/// Uses `Relaxed` ordering because this helper only publishes the cached
|
|
10
|
+
/// value itself.
|
|
11
|
+
pub(crate) struct LazyBool(AtomicU8);
|
|
12
|
+
|
|
13
|
+
impl LazyBool {
|
|
14
|
+
const UNINIT: u8 = u8::MAX;
|
|
15
|
+
|
|
16
|
+
/// Create new `LazyBool`.
|
|
17
|
+
pub const fn new() -> Self {
|
|
18
|
+
Self(AtomicU8::new(Self::UNINIT))
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/// Call the `init` closure and return the result after caching it.
|
|
22
|
+
#[cold]
|
|
23
|
+
fn cold_init(&self, init: impl FnOnce() -> bool) -> bool {
|
|
24
|
+
let val = u8::from(init());
|
|
25
|
+
self.0.store(val, Relaxed);
|
|
26
|
+
val != 0
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/// Retrieve the cached value if it was already initialized or call the `init` closure
|
|
30
|
+
/// and return the result after caching it.
|
|
31
|
+
#[inline]
|
|
32
|
+
pub fn unsync_init(&self, init: impl FnOnce() -> bool) -> bool {
|
|
33
|
+
let val = self.0.load(Relaxed);
|
|
34
|
+
if val == Self::UNINIT {
|
|
35
|
+
return self.cold_init(init);
|
|
36
|
+
}
|
|
37
|
+
val != 0
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
use core::{
|
|
2
|
+
convert::Infallible,
|
|
3
|
+
ptr::{self, NonNull},
|
|
4
|
+
sync::atomic::{AtomicPtr, Ordering::Relaxed},
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
/// Lazily caches a non-null pointer in an `AtomicPtr`.
|
|
8
|
+
///
|
|
9
|
+
/// Initialization is intentionally unsynchronized: concurrent callers may race
|
|
10
|
+
/// and run `init` more than once. Once a value is produced, it is cached and
|
|
11
|
+
/// reused by subsequent calls.
|
|
12
|
+
///
|
|
13
|
+
/// For fallible initialization (`try_unsync_init`), only successful values are
|
|
14
|
+
/// cached; errors are returned to the caller and are not cached.
|
|
15
|
+
///
|
|
16
|
+
/// Uses `Ordering::Relaxed` because this helper only publishes the cached
|
|
17
|
+
/// pointer value. Callers must not rely on this mechanism to synchronize
|
|
18
|
+
/// unrelated memory side effects performed by `init`.
|
|
19
|
+
pub(crate) struct LazyPtr<T>(AtomicPtr<T>);
|
|
20
|
+
|
|
21
|
+
impl<T> LazyPtr<T> {
|
|
22
|
+
/// Create new `LazyPtr`.
|
|
23
|
+
pub const fn new() -> Self {
|
|
24
|
+
Self(AtomicPtr::new(ptr::null_mut()))
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/// Call the `init` closure and return the result after caching it in the case of success.
|
|
28
|
+
#[cold]
|
|
29
|
+
fn cold_init<E>(&self, init: impl FnOnce() -> Result<NonNull<T>, E>) -> Result<NonNull<T>, E> {
|
|
30
|
+
let val = init()?;
|
|
31
|
+
self.0.store(val.as_ptr(), Relaxed);
|
|
32
|
+
Ok(val)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/// Retrieve the cached value if it was already initialized or call the potentially fallible
|
|
36
|
+
/// `init` closure and return the result after caching it in the case of success.
|
|
37
|
+
#[inline]
|
|
38
|
+
pub fn try_unsync_init<E>(
|
|
39
|
+
&self,
|
|
40
|
+
init: impl FnOnce() -> Result<NonNull<T>, E>,
|
|
41
|
+
) -> Result<NonNull<T>, E> {
|
|
42
|
+
let p = self.0.load(Relaxed);
|
|
43
|
+
match NonNull::new(p) {
|
|
44
|
+
Some(val) => Ok(val),
|
|
45
|
+
None => self.cold_init(init),
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/// Retrieve the cached value if it was already initialized or call the `init` closure
|
|
50
|
+
/// and return the result after caching it.
|
|
51
|
+
#[inline]
|
|
52
|
+
#[allow(dead_code, reason = "Some modules use only `try_unsync_init`")]
|
|
53
|
+
pub fn unsync_init(&self, init: impl FnOnce() -> NonNull<T>) -> NonNull<T> {
|
|
54
|
+
let Ok(p): Result<_, Infallible> = self.try_unsync_init(|| Ok(init()));
|
|
55
|
+
p
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "html-to-markdown-rs"
|
|
3
|
-
version = "2.27.
|
|
3
|
+
version = "2.27.3"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
authors = ["Na'aman Hirschfeld <naaman@kreuzberg.dev>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -40,7 +40,7 @@ serde = { version = "1.0", features = ["derive"], optional = true }
|
|
|
40
40
|
serde_json = { version = "1.0", optional = true }
|
|
41
41
|
async-trait = { version = "0.1", optional = true }
|
|
42
42
|
futures = { version = "0.3", optional = true }
|
|
43
|
-
tokio = { version = "1.
|
|
43
|
+
tokio = { version = "1.50", features = ["rt-multi-thread", "sync"], optional = true }
|
|
44
44
|
|
|
45
45
|
[dev-dependencies]
|
|
46
46
|
serde = { version = "1.0", features = ["derive"] }
|
|
@@ -188,7 +188,8 @@ pub fn process_text_node(
|
|
|
188
188
|
// the current block's content, not from a previous block's closing.
|
|
189
189
|
// Without this distinction, the second paragraph after a "\n\n" boundary
|
|
190
190
|
// would incorrectly suppress the trailing space before inline elements.
|
|
191
|
-
let
|
|
191
|
+
let safe_start = ctx.block_content_start.min(output.len());
|
|
192
|
+
let current_block_output = &output[safe_start..];
|
|
192
193
|
let at_paragraph_break = current_block_output.ends_with("\n\n");
|
|
193
194
|
if !at_paragraph_break {
|
|
194
195
|
if has_double_newline {
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
//! Regression tests for issues #216 and #217.
|
|
2
|
+
//!
|
|
3
|
+
//! Both issues report a panic at text_node.rs:191:
|
|
4
|
+
//! "byte index N is out of bounds of ``"
|
|
5
|
+
//!
|
|
6
|
+
//! Root cause: When inline handlers (strong, em, etc.) collect children into a
|
|
7
|
+
//! fresh String buffer while inheriting a parent context with block_content_start
|
|
8
|
+
//! set by a paragraph handler, the index points into the wrong buffer.
|
|
9
|
+
|
|
10
|
+
use html_to_markdown_rs::convert;
|
|
11
|
+
|
|
12
|
+
/// Minimal reproducer: a <details> containing a <p> with <strong> inside.
|
|
13
|
+
/// The <details> handler collects into a fresh buffer, the <p> sets
|
|
14
|
+
/// block_content_start, and the <strong> handler creates yet another fresh
|
|
15
|
+
/// buffer — causing the index to be out of bounds.
|
|
16
|
+
#[test]
|
|
17
|
+
fn test_issue_216_217_details_paragraph_strong_no_panic() {
|
|
18
|
+
let html = r#"
|
|
19
|
+
<div>some preceding content</div>
|
|
20
|
+
<details>
|
|
21
|
+
<summary>Summary text</summary>
|
|
22
|
+
<p><strong>Bold text inside details paragraph
|
|
23
|
+
</strong></p>
|
|
24
|
+
</details>
|
|
25
|
+
"#;
|
|
26
|
+
|
|
27
|
+
let result = convert(html, None);
|
|
28
|
+
assert!(result.is_ok());
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/// Same issue can occur with emphasis inside a paragraph inside details.
|
|
32
|
+
#[test]
|
|
33
|
+
fn test_issue_216_217_details_paragraph_em_no_panic() {
|
|
34
|
+
let html = r#"
|
|
35
|
+
<div>some preceding content</div>
|
|
36
|
+
<details>
|
|
37
|
+
<summary>Summary</summary>
|
|
38
|
+
<p><em>Italic text inside details paragraph
|
|
39
|
+
</em></p>
|
|
40
|
+
</details>
|
|
41
|
+
"#;
|
|
42
|
+
|
|
43
|
+
let result = convert(html, None);
|
|
44
|
+
assert!(result.is_ok());
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/// The panic can also occur with nested inline elements inside paragraphs
|
|
48
|
+
/// collected by any handler that creates a fresh buffer.
|
|
49
|
+
#[test]
|
|
50
|
+
fn test_issue_216_217_nested_strong_in_paragraph_no_panic() {
|
|
51
|
+
let html = r#"
|
|
52
|
+
<details>
|
|
53
|
+
<p>Some text <strong>bold text with trailing newline
|
|
54
|
+
</strong> more text</p>
|
|
55
|
+
</details>
|
|
56
|
+
"#;
|
|
57
|
+
|
|
58
|
+
let result = convert(html, None);
|
|
59
|
+
assert!(result.is_ok());
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/// Test with the actual structure pattern from the reported URL.
|
|
63
|
+
#[test]
|
|
64
|
+
fn test_issue_216_217_complex_details_structure() {
|
|
65
|
+
let html = r#"
|
|
66
|
+
<div class="content">
|
|
67
|
+
<section>
|
|
68
|
+
<details>
|
|
69
|
+
<summary>Stratégie adaptation</summary>
|
|
70
|
+
<p><strong>Risque élevé pour les populations
|
|
71
|
+
</strong></p>
|
|
72
|
+
<p>Description du risque avec des détails supplémentaires.</p>
|
|
73
|
+
</details>
|
|
74
|
+
</section>
|
|
75
|
+
</div>
|
|
76
|
+
"#;
|
|
77
|
+
|
|
78
|
+
let result = convert(html, None);
|
|
79
|
+
assert!(result.is_ok());
|
|
80
|
+
let md = result.unwrap();
|
|
81
|
+
assert!(md.contains("Risque"));
|
|
82
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"files":{".cargo_vcs_info.json":"
|
|
1
|
+
{"files":{".cargo_vcs_info.json":"028423ae25f8c28e13cd05257f322bf8db75a4cc42dc24c6d270c47638531281",".github/FUNDING.yml":"b017158736b3c9751a2d21edfce7fe61c8954e2fced8da8dd3013c2f3e295bd9",".github/workflows/ci.yml":"4a8b66b436e23d9078bcf67e652cce0e5bca4129090e8aca1a421f17ba7335ea","Cargo.lock":"c26858e11fd8b6a1ce3f879d5121f558f9e6d614a47341955ac600bfea2394e8","Cargo.toml":"baa198cfd5e82e453e6b8d9bd5435b7a79289edf86f276fc578ee726d39cc870","Cargo.toml.orig":"b6045edc8ab83292438f5651a40949b74d1d85298e523c6f3d8eaeb5f00dbf3a","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"9d6af721967088b8263c0544c0c3c459206998252dd5632a3bdf87cb27ec92be","build.rs":"cd6808c02e476b09a520105e2c6f6d325cccb1ecd542cbbcc836a0ae6f6fb0f1","rust-toolchain.toml":"6bbb61302978c736b2da03e4fb40e3beab908f85d533ab46fd541e637b5f3e0f","src/ext.rs":"dabcf1dbf9a81c2dccbfb85f81a08120f5a15be40616d51434ed4ebdfe0c7283","src/format.rs":"662db1f14106d79aacab400a3176a75989a4437ecaaa85ab88cd9a40b750cc5b","src/ident_fragment.rs":"eed1a7407182c00ddfdc98741eaa6e234a6d2c01755e95f943b27926b8c92243","src/lib.rs":"7cd707302e0915ae8fa9e295fa154eea80a592fac9e85a857f22f3a82442dcc3","src/runtime.rs":"fdb7986b31141627408b51381607f66ef4b69dd81b080c2f6489da267e96b2ba","src/spanned.rs":"713678bf5cb3b4bf2f119dcf64d188a63dc59455a724c3d2567ceab83b734d73","src/to_tokens.rs":"84c81c39c8443d116d031208abcca9f8482b8abf7bde3ee6723b7f987c10b2fd","tests/compiletest.rs":"4e381aa8ca3eabb7ac14d1e0c3700b3223e47640547a6988cfa13ad68255f60f","tests/test.rs":"023d6b57ba5ba199a04d9757e3b1464c2bc09579b035ea82c047e08d89d19226","tests/ui/does-not-have-iter-interpolated-dup.rs":"ad13eea21d4cdd2ab6c082f633392e1ff20fb0d1af5f2177041e0bf7f30da695","tests/ui/does-not-have-iter-interpolated-dup.stderr":"d076d9581ce9f684dcf51aadcf77c206a8a1d3c6774cee14e5d40339ea3ebe07","tests/ui/does-not-have-iter-interpolated.rs":"83a5b3f240651adcbe4b6e51076d76d653ad439b37442cf4054f1fd3c073f3b7","tests/ui/does-not-have-iter-interpolated.stderr":"5b611cd647c162f9d5b52d8c3eb8ed50bd1d7d325671aaf85815d7420e867169","tests/ui/does-not-have-iter-separated.rs":"fe413c48331d5e3a7ae5fef6a5892a90c72f610d54595879eb49d0a94154ba3f","tests/ui/does-not-have-iter-separated.stderr":"43fe592afacc052da2d0c9525bf7160fd4a80effa0949e83fe6291b8d6257dcb","tests/ui/does-not-have-iter.rs":"09dc9499d861b63cebb0848b855b78e2dc9497bfde37ba6339f3625ae009a62f","tests/ui/does-not-have-iter.stderr":"ccd8fb640776402f7fc980be05df5f998b9557f67a0d5d2ab89f2f7b6bd0731a","tests/ui/not-quotable.rs":"5759d0884943417609f28faadc70254a3e2fd3d9bd6ff7297a3fb70a77fafd8a","tests/ui/not-quotable.stderr":"a9748bc9a0a72a17f9c1f96e9b12be3686e9d7d51f120796516e26e5cebf62ad","tests/ui/not-repeatable.rs":"a4b115c04e4e41049a05f5b69450503fbffeba031218b4189cb931839f7f9a9c","tests/ui/not-repeatable.stderr":"72105d3dec4e8ed2a657db7d397e30d452c26c1488cb1e18e23c2d1d137a6f6d","tests/ui/wrong-type-span.rs":"6195e35ea844c0c52ba1cff5d790c3a371af6915d137d377834ad984229ef9ea","tests/ui/wrong-type-span.stderr":"cad072e40e0ecc04f375122ae41aede2f0da2a9244492b3fcf70249e59d1b128"},"package":"41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"}
|
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
strategy:
|
|
25
25
|
fail-fast: false
|
|
26
26
|
matrix:
|
|
27
|
-
rust: [nightly, stable, beta, 1.83.0, 1.
|
|
27
|
+
rust: [nightly, stable, beta, 1.83.0, 1.71.0]
|
|
28
28
|
timeout-minutes: 45
|
|
29
29
|
steps:
|
|
30
30
|
- uses: actions/checkout@v6
|
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
if: matrix.rust == 'nightly'
|
|
38
38
|
- run: cargo check
|
|
39
39
|
- run: cargo test
|
|
40
|
-
if: matrix.rust != '1.
|
|
40
|
+
if: matrix.rust != '1.71.0'
|
|
41
41
|
- run: cargo run --manifest-path benches/Cargo.toml
|
|
42
42
|
- uses: actions/upload-artifact@v6
|
|
43
43
|
if: matrix.rust == 'nightly' && always()
|
|
@@ -44,9 +44,9 @@ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
|
|
|
44
44
|
|
|
45
45
|
[[package]]
|
|
46
46
|
name = "memchr"
|
|
47
|
-
version = "2.
|
|
47
|
+
version = "2.8.0"
|
|
48
48
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
49
|
-
checksum = "
|
|
49
|
+
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
|
50
50
|
|
|
51
51
|
[[package]]
|
|
52
52
|
name = "proc-macro2"
|
|
@@ -59,16 +59,16 @@ dependencies = [
|
|
|
59
59
|
|
|
60
60
|
[[package]]
|
|
61
61
|
name = "quote"
|
|
62
|
-
version = "1.0.
|
|
62
|
+
version = "1.0.44"
|
|
63
63
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
64
|
-
checksum = "
|
|
64
|
+
checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
|
|
65
65
|
dependencies = [
|
|
66
66
|
"proc-macro2",
|
|
67
67
|
]
|
|
68
68
|
|
|
69
69
|
[[package]]
|
|
70
70
|
name = "quote"
|
|
71
|
-
version = "1.0.
|
|
71
|
+
version = "1.0.45"
|
|
72
72
|
dependencies = [
|
|
73
73
|
"proc-macro2",
|
|
74
74
|
"rustversion",
|
|
@@ -106,7 +106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
106
106
|
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
107
107
|
dependencies = [
|
|
108
108
|
"proc-macro2",
|
|
109
|
-
"quote 1.0.
|
|
109
|
+
"quote 1.0.44",
|
|
110
110
|
"syn",
|
|
111
111
|
]
|
|
112
112
|
|
|
@@ -134,12 +134,12 @@ dependencies = [
|
|
|
134
134
|
|
|
135
135
|
[[package]]
|
|
136
136
|
name = "syn"
|
|
137
|
-
version = "2.0.
|
|
137
|
+
version = "2.0.117"
|
|
138
138
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
139
|
-
checksum = "
|
|
139
|
+
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
140
140
|
dependencies = [
|
|
141
141
|
"proc-macro2",
|
|
142
|
-
"quote 1.0.
|
|
142
|
+
"quote 1.0.44",
|
|
143
143
|
"unicode-ident",
|
|
144
144
|
]
|
|
145
145
|
|
|
@@ -160,9 +160,9 @@ dependencies = [
|
|
|
160
160
|
|
|
161
161
|
[[package]]
|
|
162
162
|
name = "toml"
|
|
163
|
-
version = "0.
|
|
163
|
+
version = "1.0.3+spec-1.1.0"
|
|
164
164
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
165
|
-
checksum = "
|
|
165
|
+
checksum = "c7614eaf19ad818347db24addfa201729cf2a9b6fdfd9eb0ab870fcacc606c0c"
|
|
166
166
|
dependencies = [
|
|
167
167
|
"indexmap",
|
|
168
168
|
"serde_core",
|
|
@@ -175,18 +175,18 @@ dependencies = [
|
|
|
175
175
|
|
|
176
176
|
[[package]]
|
|
177
177
|
name = "toml_datetime"
|
|
178
|
-
version = "0.
|
|
178
|
+
version = "1.0.0+spec-1.1.0"
|
|
179
179
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
180
|
-
checksum = "
|
|
180
|
+
checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e"
|
|
181
181
|
dependencies = [
|
|
182
182
|
"serde_core",
|
|
183
183
|
]
|
|
184
184
|
|
|
185
185
|
[[package]]
|
|
186
186
|
name = "toml_parser"
|
|
187
|
-
version = "1.0.
|
|
187
|
+
version = "1.0.9+spec-1.1.0"
|
|
188
188
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
189
|
-
checksum = "
|
|
189
|
+
checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4"
|
|
190
190
|
dependencies = [
|
|
191
191
|
"winnow",
|
|
192
192
|
]
|
|
@@ -199,9 +199,9 @@ checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607"
|
|
|
199
199
|
|
|
200
200
|
[[package]]
|
|
201
201
|
name = "trybuild"
|
|
202
|
-
version = "1.0.
|
|
202
|
+
version = "1.0.116"
|
|
203
203
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
204
|
-
checksum = "
|
|
204
|
+
checksum = "47c635f0191bd3a2941013e5062667100969f8c4e9cd787c14f977265d73616e"
|
|
205
205
|
dependencies = [
|
|
206
206
|
"dissimilar",
|
|
207
207
|
"glob",
|
|
@@ -215,9 +215,9 @@ dependencies = [
|
|
|
215
215
|
|
|
216
216
|
[[package]]
|
|
217
217
|
name = "unicode-ident"
|
|
218
|
-
version = "1.0.
|
|
218
|
+
version = "1.0.24"
|
|
219
219
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
220
|
-
checksum = "
|
|
220
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
221
221
|
|
|
222
222
|
[[package]]
|
|
223
223
|
name = "winapi-util"
|
|
@@ -251,6 +251,6 @@ checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829"
|
|
|
251
251
|
|
|
252
252
|
[[package]]
|
|
253
253
|
name = "zmij"
|
|
254
|
-
version = "1.0.
|
|
254
|
+
version = "1.0.21"
|
|
255
255
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
256
|
-
checksum = "
|
|
256
|
+
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "quote"
|
|
3
|
-
version = "1.0.
|
|
3
|
+
version = "1.0.45"
|
|
4
4
|
authors = ["David Tolnay <dtolnay@gmail.com>"]
|
|
5
5
|
autobenches = false
|
|
6
6
|
categories = ["development-tools::procedural-macro-helpers"]
|
|
@@ -10,7 +10,7 @@ edition = "2021"
|
|
|
10
10
|
keywords = ["macros", "syn"]
|
|
11
11
|
license = "MIT OR Apache-2.0"
|
|
12
12
|
repository = "https://github.com/dtolnay/quote"
|
|
13
|
-
rust-version = "1.
|
|
13
|
+
rust-version = "1.71"
|
|
14
14
|
|
|
15
15
|
[dependencies]
|
|
16
16
|
proc-macro2 = { version = "1.0.80", default-features = false }
|
data/rust-vendor/quote/README.md
CHANGED
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
//! [prettyplease]: https://github.com/dtolnay/prettyplease
|
|
90
90
|
|
|
91
91
|
#![no_std]
|
|
92
|
-
#![doc(html_root_url = "https://docs.rs/quote/1.0.
|
|
92
|
+
#![doc(html_root_url = "https://docs.rs/quote/1.0.45")]
|
|
93
93
|
#![allow(
|
|
94
94
|
clippy::doc_markdown,
|
|
95
95
|
clippy::elidable_lifetime_names,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
use super::TokenStreamExt;
|
|
2
|
+
use std::sync::Arc;
|
|
2
3
|
use alloc::borrow::{Cow, ToOwned};
|
|
3
4
|
use alloc::boxed::Box;
|
|
4
5
|
use alloc::ffi::CString;
|
|
@@ -104,6 +105,12 @@ impl<T: ?Sized + ToTokens> ToTokens for Rc<T> {
|
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
107
|
|
|
108
|
+
impl<T: ?Sized + ToTokens> ToTokens for Arc<T> {
|
|
109
|
+
fn to_tokens(&self, tokens: &mut TokenStream) {
|
|
110
|
+
(**self).to_tokens(tokens);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
107
114
|
impl<T: ToTokens> ToTokens for Option<T> {
|
|
108
115
|
fn to_tokens(&self, tokens: &mut TokenStream) {
|
|
109
116
|
if let Some(t) = self {
|
|
@@ -10,11 +10,11 @@ error[E0277]: the trait bound `Ipv4Addr: ToTokens` is not satisfied
|
|
|
10
10
|
= help: the following other types implement trait `ToTokens`:
|
|
11
11
|
&T
|
|
12
12
|
&mut T
|
|
13
|
+
Arc<T>
|
|
13
14
|
Box<T>
|
|
14
15
|
CStr
|
|
15
16
|
CString
|
|
16
17
|
Cow<'a, T>
|
|
17
18
|
Option<T>
|
|
18
|
-
Rc<T>
|
|
19
19
|
and $N others
|
|
20
20
|
= note: this error originates in the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
@@ -2,7 +2,7 @@ error[E0599]: the method `quote_into_iter` exists for struct `Ipv4Addr`, but its
|
|
|
2
2
|
--> tests/ui/not-repeatable.rs:7:13
|
|
3
3
|
|
|
|
4
4
|
3 | struct Ipv4Addr;
|
|
5
|
-
| --------------- method `quote_into_iter` not found for this struct because
|
|
5
|
+
| --------------- method `quote_into_iter` not found for this struct because `Ipv4Addr` doesn't implement `Iterator` or `ToTokens`
|
|
6
6
|
...
|
|
7
7
|
7 | let _ = quote! { #(#ip)* };
|
|
8
8
|
| ^^^^^^^^^^^^^^^^^^ method cannot be called on `Ipv4Addr` due to unsatisfied trait bounds
|
|
@@ -19,8 +19,8 @@ error[E0599]: the method `quote_into_iter` exists for struct `Ipv4Addr`, but its
|
|
|
19
19
|
note: the traits `Iterator` and `ToTokens` must be implemented
|
|
20
20
|
--> $RUST/core/src/iter/traits/iterator.rs
|
|
21
21
|
|
|
|
22
|
-
| pub trait Iterator {
|
|
23
|
-
|
|
|
22
|
+
| pub const trait Iterator {
|
|
23
|
+
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
24
24
|
|
|
|
25
25
|
::: src/to_tokens.rs
|
|
26
26
|
|
|
|
@@ -32,11 +32,3 @@ note: the traits `Iterator` and `ToTokens` must be implemented
|
|
|
32
32
|
candidate #2: `quote::__private::ext::RepIteratorExt`
|
|
33
33
|
candidate #3: `quote::__private::ext::RepToTokensExt`
|
|
34
34
|
= note: this error originates in the macro `$crate::quote_bind_into_iter` which comes from the expansion of the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
35
|
-
|
|
36
|
-
error[E0282]: type annotations needed
|
|
37
|
-
--> tests/ui/not-repeatable.rs:7:13
|
|
38
|
-
|
|
|
39
|
-
7 | let _ = quote! { #(#ip)* };
|
|
40
|
-
| ^^^^^^^^^^^^^^^^^^ cannot infer type
|
|
41
|
-
|
|
|
42
|
-
= note: this error originates in the macro `$crate::quote_bind_next_or_break` which comes from the expansion of the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"files":{".cargo_vcs_info.json":"
|
|
1
|
+
{"files":{".cargo_vcs_info.json":"d8d0d853429b028d5e3c7b969f7c6b77b04e17486c57fac0759eb8083a359f3f",".github/workflows/publish.yml":"431c68b9d566180134e8771ea9cb9339d72ec77c3010b4cedfd423e271dc7386",".github/workflows/rust-tests.yml":"ca7ba173da0a6510676770b103119ce57029d424afe9e1027541d529af6c7f3f","AUTHORS":"d027e91dbc9cdbb2f1190068e498bd6b61cff022b6a032b191021ba658d96111","Cargo.lock":"78ff5baf710cdea584efe5a5178a658f368a4de740bd53d8733347d004767c4c","Cargo.toml":"a021f9fb0645cc5de5770cf7f41594c1deff4b388eca933b289752aa52666829","Cargo.toml.orig":"b8e89c393831c2161b6d390bd40422910ac34f02903ad39edd85ec38d4513fef","Makefile":"b445cfadd750b564ba8ef072754a4eed5aa127f12faa6e5b15a35b748d28b6fb","NEWS.md":"e815ccc6fb453ed64d5e1b73fb4ca6204a3f8f65e3ab0afdb86da65b5209e33d","README.md":"420f65fec3ba2e89d49da51b222d2881d26959037a7b7d3794143db4bd4627b1","examples/freestanding.rs":"0be5eb60397228306aa9f8afc533e32926d210205a7359e14da903159482416d","examples/gop-query.rs":"3257c55d6ae4572db1bfcaf20bc05990ea92d46c5d292eb99c278242f1007e2c","examples/hello-world.rs":"1a398f93a54bfddaab6ba3e0145cf70496266c44b9748a11ff569a9a18063bc4","src/base.rs":"864924a118f60edcdc9eaf8bdab31879ab1143166905e6eb0657f6f08d17b9a1","src/hii.rs":"d0b19b7cc7b0c2c4d70e2891554ed6d7f941388709476eab6fa7bad129c583ed","src/lib.rs":"6215dd213f39f5180f7cfad599df1d17d50f089dc1ad0c840bc647a0bc421953","src/protocols.rs":"a8f1c0d9abf2af2d7962fce68160a3bf8083165bb70861808423afedadee6602","src/protocols/absolute_pointer.rs":"b486324e1d2e352ca15e865afe97132a4b260609541f327c041bc947b2ddcd09","src/protocols/block_io.rs":"7fc213e8c07897b9318982e1d1f8b7c492ce0c881c4cd1d38d3eb91e590585ed","src/protocols/bus_specific_driver_override.rs":"e482a908e9d5027f10e449f5039a66db035fdef18329778a5ae97a094586888a","src/protocols/debug_support.rs":"16f17179ef274ef45c65d2fc8ff5db1e2131d8b3b4c86b9b531926642009a468","src/protocols/debugport.rs":"abe5b09e2192e6b8290205538947a79f433529ba2bb57708f74ea2b6f4172f6b","src/protocols/decompress.rs":"d10500f1f155ade02164e87c42ea81e7a767f20888a1f6ef189291492196ddbc","src/protocols/device_path.rs":"1a8c897f8e392fd7fe60d829b7852d22dd847f5f64bf1382e58e7776d9a176a2","src/protocols/device_path_from_text.rs":"9a4bb364b57e3dc39b40b93e2096e82a10b3251643e81de9f2c8abd40e705005","src/protocols/device_path_to_text.rs":"b2b1325aed4a4fcf142fae8208308590f2fa53eea999bb1bf22f592bf25109eb","src/protocols/device_path_utilities.rs":"36960de844fcf2634a9180ffd621f0b9771ffb4acc364d74c34680bbf58ee224","src/protocols/disk_io.rs":"831e774ddd1a75839c5d89cd704c2d59bb0adce554eecdc8bb12e9569b7a8747","src/protocols/disk_io2.rs":"645a83979e91679036ebc90fd8ab584158055a6c8316aaf620300470aac4ba2d","src/protocols/driver_binding.rs":"60bf714b8bb5d2ed183335e1d745a7150eb59d0d59241eb29251682ec1224434","src/protocols/driver_diagnostics2.rs":"dcbcd95b327768d70637ded79140e609a36aa1369f16c58764c8d161d072e615","src/protocols/driver_family_override.rs":"42ae2f96a94ea516f9696162d12e65613f4acc3cb78831be22d868846574d231","src/protocols/file.rs":"a4136bedb02272296b2246a9b4bee1096456d4c2e078bed5d1330c77d8666a6d","src/protocols/graphics_output.rs":"7c185179a32558f506eb84402c26e3bdb8bee795c1403d493fd24c7d9c3a07a9","src/protocols/hii_database.rs":"4af0d8ab357faffd568c12f2ce8df518dd3e186c1da980fbe2198f20e3ce0ac5","src/protocols/hii_font.rs":"d8a418f8b0776cd2cce0c60b457f8c09b63aadd64e6f9ce75526ddc1c5c32b80","src/protocols/hii_font_ex.rs":"f856de80e759a9c503ce5d3cca5092ec12739ab0b157f4bac8819b5275b730e9","src/protocols/hii_package_list.rs":"6bb29d076697bb3b672913b98f55995f9efcba830b4ab6bfed29bd8402aa70ab","src/protocols/hii_string.rs":"e8e725fae9860fdcdd777a0b99e48b7e4a5f5f464827414bb0aeed139ea5b993","src/protocols/ip4.rs":"09290d2a5a2cafd2b834ce86b59917d0f25d7d16f4f329aeedc171a8147ebef7","src/protocols/ip6.rs":"511de9f36af4c320f74e424c64433a70f1bd66e8b6fc9daa0e1744a0b46b1a5d","src/protocols/load_file.rs":"e8c845eb1812c3967bb026ef60ab40826e35e6fa3185007357b19311cef67eaf","src/protocols/load_file2.rs":"5be9c5d501b4f10a44ba91448fce5d4a20c01eab9a8f7fb3c63eaa62cbb1c2f4","src/protocols/loaded_image.rs":"64447c64a0a4ac3b79263bf2564ff1a930b2424ca2fd93e37d714c16c31a7205","src/protocols/loaded_image_device_path.rs":"66e8fe3477785dadf96401da10e203ba729e54d7eddedaffc4d17acc9a0daf7f","src/protocols/managed_network.rs":"f1acc8d727fa9a1fba7b376ed093c129dd8fddc8d164ca59c201e37f276e0525","src/protocols/memory_attribute.rs":"1aa7a99ed6fd268e1921dc073634cf9346759c048f5c90bef2928ac27e56a125","src/protocols/mp_services.rs":"d98a27d29f835b011a09eafaf276dd921328dc7b676713c1c437f4adef5409a6","src/protocols/pci_io.rs":"4b7ad8d7b9ee0d5e50e09b6ca12467ec4b43dfb3e455cfdd1e6e10617e26d171","src/protocols/platform_driver_override.rs":"5eb7cbc2609b0369cf380fa54be963f331124cae3fc5fd19fe75212dba4d3d9c","src/protocols/rng.rs":"a9f4854fa54acab7e8638d37e9c0b71ce36d02fcdc37b2d43726ba9686e8a3a9","src/protocols/service_binding.rs":"7c3b7c4256499451efc922d00f021479ae743706b5ed36c86aaf55c225612675","src/protocols/shell.rs":"e9fb2ab62988067d13ee839c10aacf47d94f5e92c213e1670530fe1c472925f8","src/protocols/shell_dynamic_command.rs":"e13f152c2ca57988d1b2b476b45cd6e6dc899e76359ecb2d8e04aeb55ca480ca","src/protocols/shell_parameters.rs":"fb88c63822a14dc94e96f7912fa5409f68b669105fb81459b969ec066002e352","src/protocols/simple_file_system.rs":"019910e8f5c44ba6a98ff9848eafa31e05c32833a69fbee108f2dd322bdb1748","src/protocols/simple_network.rs":"fd12bd27444634064fe5e2308b0504d452b18092d5f6e0fcba2e35cc40998b54","src/protocols/simple_text_input.rs":"673944368289c1f11313944416512169a461a8703cef039e50e1414e291152b1","src/protocols/simple_text_input_ex.rs":"b9514fe34f105dc88b9241c88adeefc18e33cbd692acc164fa0a25dbaee24c6d","src/protocols/simple_text_output.rs":"835f5ec786c1a688384b3280dcc5f75383f7822938b9ea16c9e9b802a183d293","src/protocols/tcp4.rs":"90facae493a4a5ca192c45cc323528613398f076b5d4449ac9ad617a32217f4d","src/protocols/tcp6.rs":"cf99e4cb9cadcd9ea4ef349afbb343090cae71a1324bb4e7812834f465a5b8c6","src/protocols/timestamp.rs":"ea8e5ed87c9fce83c037038bdee5daf92946631cc41774b288e6dfc5811cb64f","src/protocols/udp4.rs":"bc85ba588df857a233132c42b7fb3418acb6d89581a5b4ab2d6156e18bb17547","src/protocols/udp6.rs":"806ed1cbd53874f8a171aa3f86fdd40f2fcaa493dc2eadb0c286d8e4d67078e8","src/system.rs":"54ebb9a3842fc62a7dd4a2240490f6563c66904a14c1f81961a3677a54d85390","src/vendor.rs":"6cc53fe0e98220fe627d82c9b27f1468095358bb26634a8c19274495888138af","src/vendor/intel/console_control.rs":"05363b80feb22aa585cbe16ec4a1c8e1ef592e8e57b1a676de0562723c729275"},"package":"f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"}
|
data/rust-vendor/r-efi/AUTHORS
CHANGED
|
@@ -56,6 +56,7 @@ COPYRIGHT: (ordered alphabetically)
|
|
|
56
56
|
Copyright (C) 2022-2023 David Rheinsberg
|
|
57
57
|
|
|
58
58
|
AUTHORS: (ordered alphabetically)
|
|
59
|
+
Alan Egerton <eggyal@gmail.com>
|
|
59
60
|
Alex James <theracermaster@gmail.com>
|
|
60
61
|
Ayush Singh <ayushsingh1325@gmail.com>
|
|
61
62
|
Boris-Chengbiao Zhou <bobo1239@web.de>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
edition = "2018"
|
|
14
14
|
rust-version = "1.68"
|
|
15
15
|
name = "r-efi"
|
|
16
|
-
version = "
|
|
16
|
+
version = "6.0.0"
|
|
17
17
|
build = false
|
|
18
18
|
autolib = false
|
|
19
19
|
autobins = false
|
|
@@ -40,8 +40,6 @@ license = "MIT OR Apache-2.0 OR LGPL-2.1-or-later"
|
|
|
40
40
|
repository = "https://github.com/r-efi/r-efi"
|
|
41
41
|
|
|
42
42
|
[features]
|
|
43
|
-
efiapi = []
|
|
44
|
-
examples = ["native"]
|
|
45
43
|
native = []
|
|
46
44
|
rustc-dep-of-std = ["core"]
|
|
47
45
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "r-efi"
|
|
3
|
-
version = "
|
|
3
|
+
version = "6.0.0"
|
|
4
4
|
|
|
5
5
|
categories = [
|
|
6
6
|
"embedded",
|
|
@@ -28,10 +28,6 @@ rust-version = "1.68"
|
|
|
28
28
|
core = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-core' }
|
|
29
29
|
|
|
30
30
|
[features]
|
|
31
|
-
# No-op for backwards compatibility.
|
|
32
|
-
efiapi = []
|
|
33
|
-
# Maps to `native` for backwards compatibility.
|
|
34
|
-
examples = ['native']
|
|
35
31
|
# We feature-gate all native code, since it will not link correctly, unless you
|
|
36
32
|
# use a UEFI target configuration. To make `cargo test` work, we exclude all
|
|
37
33
|
# these from normal runs.
|