Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

디버깅 용이성

모든 공개 타입은 Debug를 구현합니다 (C-DEBUG)

예외가 있더라도 드뭅니다.

Debug 표현은 결코 비어 있지 않습니다 (C-DEBUG-NONEMPTY)

개념적으로 비어 있는 값이라도 Debug 표현은 결코 비어 있어서는 안 됩니다.

#![allow(unused)]
fn main() {
let empty_str = "";
assert_eq!(format!("{:?}", empty_str), "\"\"");

let empty_vec = Vec::<bool>::new();
assert_eq!(format!("{:?}", empty_vec), "[]");
}