Skip to content

Error in executing realtime rendering example #3

@k-jayanth

Description

@k-jayanth

I am new to rust and when i was trying to execute this example its giving error at this line

while let Some(_) = draw_piston_window(&mut window, |b| {

the error was

   --> src/main.rs:151:44
    |
151 |     while let Some(_) = draw_piston_window(&mut window, |b| {
    |                                            ^^^^^^^^^^^ expected struct `piston_window::PistonWindow`, found struct `PistonWindow`
    |
    = note: expected mutable reference `&mut piston_window::PistonWindow`
               found mutable reference `&mut PistonWindow`
    = note: perhaps two different versions of crate `piston_window` are being used?

i am using the following versions
plotters-piston = "0.3.0"
plotters-backend = "0.3.0"
piston_window = "0.120.0"
systemstat = "0.1.8"
plotters = "0.3.1"

please help me solve this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions