Merge branch 'master' into gui_search

This commit is contained in:
venashial
2022-08-03 00:44:17 -07:00
parent b0a55c9b18
commit 51982dde62
79 changed files with 6320 additions and 6336 deletions

23
theseus/src/util/mod.rs Normal file
View File

@@ -0,0 +1,23 @@
//! Theseus utility functions
pub mod fetch;
pub mod platform;
/// Wrap a builder which uses a mut reference into one which outputs an owned value
macro_rules! wrap_ref_builder {
($id:ident = $init:expr => $transform:block) => {{
let mut it = $init;
{
let $id = &mut it;
$transform;
}
it
}};
}
/// Alias a trait, used to avoid needing nightly features
macro_rules! alias_trait {
($scope:vis $name:ident : $bound:path $(, $bounds:path)*) => {
$scope trait $name: $bound $(+ $bounds)* {}
impl<T: $bound $(+ $bounds)*> $name for T {}
}
}