title: how to deal with this fundamental error in rust?
body: <blockquote>
  <p>im writing a program to convert a number  to sorted reversed array of digits.
  eg : 23453 -&gt; vec![5,4,3,3,2]
  but i got this error! and i cant fix this</p>
  </blockquote>
  <pre><code>error[E0599]: no method named `sorted` found for struct `Chars` in the current scope
      --&gt; src/main.rs:2050:25
       |
  2050 |   n.to_string().chars().sorted().map(|no| no.to_digit(10).unwrap() as u32).rev().collect::&lt;Vec&lt;u32&gt;&gt;()
       |                         ^^^^^^ method not found in `Chars&lt;'_&gt;`
  
  error[E0277]: `Vec&lt;u32&gt;` doesn't implement `std::fmt::Display`
  </code></pre>
  <blockquote>
  <p>here is my code,</p>
  </blockquote>
  <pre><code>fn sorted_rev_arr(n : u32) -&gt; Vec&lt;u32&gt;{
    n.to_string().chars().sorted().map(|no| no.to_digit(10).unwrap() as u32).rev().collect::&lt;Vec&lt;u32&gt;&gt;()
  }
  
  fn main(){
    let random_number = 23453;
    println!(&quot;the new number in array is {}&quot;,sorted_rev_arr(random_number));
  }
  </code></pre>
  <blockquote>
  <p>can anybody help me to resolve this issue ?</p>
  </blockquote>