Ben Chuanlong Du's Blog

It is never too late to learn.

Tips on Rustfmt

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Configuring Rustfmt

tab_spaces = 4
max_width = 90
chain_width = 70
newline_style = "unix"
use_field_init_shorthand = true
use_small_heuristics = "Max"

References

https://github.com/rust-lang/rustfmt

Format a Flash Drive in a Linux Virtual Machine

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Install VirtualBox.

  2. Create a Ubuntu virtual machine.

  3. Install extension package.

  4. enable USB support

  5. select the flash drive you want to format to connect to the VM.

  6. use linux commands to format …

Format a String in Python

str.format

An exception will be thrown if the value for a key in the string is not specified, which means that you must specify values for all keys. However, it is OK if you specify values for keys that do not exist in the string. That is you can specify values for more keys than needed.