Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"allowCompoundWords": true,
"minWordLength": 1,
"words": [
"acq",
"bz2",
"cfgs",
"ctx",
"docsrs",
"dyn",
"env",
"eprintln",
"fmt",
"fn",
"fx",
"gc",
"headered",
"img",
"immut",
"impls",
"libc",
"LLM",
"Miri",
"MSRV",
"nar",
"nixos",
"nixpkgs",
"num",
"numtide",
"oxalica",
"pkgs",
"Planus",
"pointee",
"ptr",
"reborrow",
"reborrows",
"repr",
"rustc",
"str",
"sysinfo",
"triomphe",
"tt",
"UB",
"uncloneable",
"vec",
"vtable",
"vtables",
"xid"
],
"flagWords": [
"fomrat: format",
"fromat: format",
"hte: the"
]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
// This is to override user-specific dictionaries
"cSpell.userWords": [],
"cSpell.flagWords": [],
"cSpell.ignoreWords": [],
}
4 changes: 2 additions & 2 deletions src/hooks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ impl Hooks {
/// // Replace with different hooks
/// let hooks2 = Hooks::new().attachment_collector(|| "second".to_string());
/// let previous = hooks2.replace();
/// # unsafe { previous.unwrap().reclaim(); } // Clean up as miri does not like memory leaks
/// # unsafe { previous.unwrap().reclaim(); } // Clean up as Miri does not like memory leaks
/// ```
pub fn replace(self) -> Option<HooksHandle> {
self.leak().replace()
Expand Down Expand Up @@ -617,7 +617,7 @@ impl Hooks {
/// let old_hooks = Hooks::new().attachment_collector(|| "v2").replace();
///
/// // Option 1: Drop and leak (typical case)
/// # // We don't want to leak in the doctest, as miri will complain about a memory leak
/// # // We don't want to leak in the doctest, as Miri will complain about a memory leak
/// # let saved_old_hooks = old_hooks;
/// # let old_hooks = ();
/// let _ = old_hooks;
Expand Down