Skip to content

Commit 1c33fc9

Browse files
authored
Remove duplicate derive Clone in macro (#620)
* Remove duplicate derive Clone in macro Signed-off-by: Jorge Prendes <[email protected]> * Make rust-analyzer happy when evaluating the component macros Signed-off-by: Jorge Prendes <[email protected]> * bump Cargo.lock files Signed-off-by: Jorge Prendes <[email protected]> --------- Signed-off-by: Jorge Prendes <[email protected]>
1 parent 155706b commit 1c33fc9

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

src/hyperlight_component_macro/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ use hyperlight_component_util::*;
6565
/// Hyperlight.
6666
#[proc_macro]
6767
pub fn host_bindgen(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
68-
env_logger::init();
68+
let _ = env_logger::try_init();
6969
let path: Option<syn::LitStr> = syn::parse_macro_input!(input as Option<syn::LitStr>);
7070
let path = path
7171
.map(|x| x.value().into())
@@ -88,7 +88,7 @@ pub fn host_bindgen(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
8888
/// into the Hyperlight host).
8989
#[proc_macro]
9090
pub fn guest_bindgen(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
91-
env_logger::init();
91+
let _ = env_logger::try_init();
9292
let path: Option<syn::LitStr> = syn::parse_macro_input!(input as Option<syn::LitStr>);
9393
let path = path
9494
.map(|x| x.value().into())

src/hyperlight_component_util/src/rtypes.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,6 @@ fn emit_value_toplevel(s: &mut State, v: Option<u32>, id: Ident, vt: &Value) ->
471471
#[derive(::wasmtime::component::ComponentType)]
472472
#[derive(::wasmtime::component::Lift)]
473473
#[derive(::wasmtime::component::Lower)]
474-
#[derive(::core::clone::Clone)]
475474
#[derive(::core::marker::Copy)]
476475
#[component(enum)]
477476
#[repr(u8)] // todo: should this always be u8?

src/tests/rust_guests/callbackguest/Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tests/rust_guests/simpleguest/Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)