skerkour/kerkour.com

Rust File Encryption: Use of unstable library feature 'array_methods'

Shadorain opened this issue · 3 comments

image
Hey Kerkour! Appreciate the blog posts and projects you have. Was going through the rust_file_encryption one and I'm getting a problem with slicing the buffer at lines 116 and 151 (via .as_slice()). Just letting you know that it is not building right :) thanks!

Hi @Shadorain Thanks for the heads up!

It seems that you have an older version of Rust installed, as of Rust 1.57.0, .as_slice is no longer an unstable feature (https://doc.rust-lang.org/std/primitive.array.html#method.as_slice).

You can update to the latest version of Rust with rustup update.

Alternatively, if you don't want to update, you can use &buffer[..read_count]

Sylvain
✌️

Apologies for that! Just switched back to my desktop which I haven't used since been away at school and never updated Rust!
Thanks for the help there, didn't mean to bother!

No worries, Happy end of the year :)