Skip to content

Array is not IIterable #1340

@Corallus-Caninus

Description

@Corallus-Caninus

the following code does not compile since Array is not IIterable. Yet this is how this function should be called in the window documentation.

let mouse_injection = InjectedInputMouseInfo::new().unwrap();
mouse_injection.SetDeltaY(y as i32).unwrap();
mouse_injection.SetDeltaX(x as i32).unwrap();
let injector = InputInjector::TryCreate().unwrap();
let mouse_injection_array: Array<InjectedInputMouseInfo> = Array::from_slice(&[Some(mouse_injection)]);
injector.InjectMouseInput(mouse_injection_array).unwrap();

This (and intuition) leads me to believe Array in windows::core should also be IIterable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions