Jacobbishopxy / studies-rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Studies RS

Since rust-analyzer needs full scan each time opening the project, it takes a long time and disk space for saving target file. Hence, for VsCode user please manually uncomment the sub-project name (willing to be tested), and this setting is in "rust-analyzer.linkedProjects" field which locates in .vscode/settings.json file.

To test

To read

To learn

Little Notes

String conversion:

&str    -> String--| String::from(s) or s.to_string() or s.to_owned()
&str    -> &[u8]---| s.as_bytes()
&str    -> Vec<u8>-| s.as_bytes().to_vec() or s.as_bytes().to_owned()
String  -> &str----| &s if possible* else s.as_str()
String  -> &[u8]---| s.as_bytes()
String  -> Vec<u8>-| s.into_bytes()
&[u8]   -> &str----| s.to_vec() or s.to_owned()
&[u8]   -> String--| std::str::from_utf8(s).unwrap(), but don't**
&[u8]   -> Vec<u8>-| String::from_utf8(s).unwrap(), but don't**
Vec<u8> -> &str----| &s if possible* else s.as_slice()
Vec<u8> -> String--| std::str::from_utf8(&s).unwrap(), but don't**
Vec<u8> -> &[u8]---| String::from_utf8(s).unwrap(), but don't**

About

License:Apache License 2.0


Languages

Language:Rust 91.8%Language:CSS 2.1%Language:TypeScript 2.0%Language:HTML 1.6%Language:Shell 1.0%Language:PLpgSQL 0.4%Language:Python 0.4%Language:JavaScript 0.3%Language:Makefile 0.2%Language:Dockerfile 0.2%Language:SCSS 0.1%Language:Sass 0.0%