nihalpasham / rustBoot-book

rustBoot documentation
MIT License
10 stars 7 forks source link

error[E0599]: no method named `unwrap_or` found for struct `PanicMessage` in the current scope #35

Open vamsz opened 4 weeks ago

vamsz commented 4 weeks ago

The error message no method named 'unwrap_or' found for struct 'PanicMessage' means that the Rust compiler is unable to find a method named unwrap_or that can be called on a PanicMessage object.

In Rust, unwrap_or is commonly used with Option and Result types. For example, Option has an unwrap_or method that returns the value inside the Option if it is Some, or a default value if it is None. Similarly, Result has an unwrap_or method for handling Ok and Err cases. Screenshot from 2024-08-15 15-34-19

Strange21 commented 3 weeks ago

Hi @vamsz, Can you please elaborate the steps to re-produce the error, because I tried to compile rustBoot for rpi4 & it built successfully on my machine with following rust tool chain.

active toolchain
----------------

nightly-2023-10-10-x86_64-unknown-linux-gnu (default)
rustc 1.75.0-nightly (59edd6705 2023-10-09)

also paste your active toolchains info using rustup show for quick connects you can find us on elements.io

vamsz commented 2 weeks ago

By using different version we are getting this now I used different version I can compile it IMG_20240823_202551.jpg