@noble vine sorry for the ping but I'm really having a hell of a time with this lol
I'm not the world's best Rust programmer, but I would like to learn so if you have the time to explain what is going on and how I might go about fixing it I'd appreciate it!
I'm currently calling two functions:
pub unsafe fn AddWebResourceRequestedFilter<P0>(&self, uri: P0, resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,```
```webview2_com_sys::Microsoft::Web::WebView2::Win32::ICoreWebView2HttpRequestHeaders
pub unsafe fn SetHeader<P0, P1>(&self, name: P0, value: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,```
My calls look like this:
```core.AddWebResourceRequestedFilter(
&HSTRING::from("*"),
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL,
)
.unwrap();```
```.SetHeader(
&HSTRING::from("Origin"),
&HSTRING::from("localhost"),
)```
I feel like I must be doing something foolish here because the first call, the one to `AddWebResourceRequestedFilter` is giving me an error while the second call to `SetHeader` is not, even though the type signatures appear identical to me.
I doubt I can fit the full compiler warning in here, but a key part of it may be:
```type mismatch resolving `<&HSTRING as TypeKind>::TypeKind == CopyType`
required for `&HSTRING` to implement `windows_core::param::Param<windows_strings::pcwstr::PCWSTR, windows_core::r#type::CopyType>`
...
perhaps two different versions of crate `windows_core` are being used?
...
can_into.rs(5, 1): trait impl with same name found
can_into.rs(1, 1): there are multiple different versions of crate `windows_core` in the dependency graph```
Looking at `cargo tree -p windows-core` I can see that I do indeed have multiple versions of `windows-core` installed. Specifically, `0.52.0`, `0.57.0`, and `0.60.1`.
Is there something I should be doing to reconcile these versions, or is there some way I can specify which version I would like to use here? Or am I just off-base and off my rocker?
Thanks for the help, let me know if I can further clarify anything.