Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

as_ref_mut.rs weird error using provided solution #2051

Closed
DaQue opened this issue Jul 16, 2024 · 1 comment
Closed

as_ref_mut.rs weird error using provided solution #2051

DaQue opened this issue Jul 16, 2024 · 1 comment

Comments

@DaQue
Copy link

DaQue commented Jul 16, 2024

I copied the solution and pasted it over my solution because I kept getting an odd error and I still get this error:

error[E0277]: cannot divide f64 by usize
--> exercises/23_conversions/using_as.rs:8:11
|
8 | total / values.len()
| ^ no implementation for f64 / usize
|
= help: the trait Div<usize> is not implemented for f64
= help: the following other types implement trait Div<Rhs>:

<f64 as Div<&f64>>
<&'a f64 as Div>
<&f64 as Div<&f64>>

For more information about this error, try rustc --explain E0277.
error: could not compile exercises (bin "using_as") due to 1 previous error

It doesn't even match line 8 which is just "}".

@mo8it
Copy link
Contributor

mo8it commented Jul 17, 2024

The feedback that you get is not about the exercise as_ref_mut but about using_as (shown in the path exercises/23_conversions/using_as.rs:8:11 and at the end bin "using_as").

@mo8it mo8it closed this as completed Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants