cubing_core 0.15.2

Features from `cubing.js` in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::fmt;

// TODO: Remove `PartialEq` if we add any metadata (e.g. parsing info, or memoizations).
#[derive(Debug, Default, Clone, PartialEq, Eq)]
pub struct Newline {}

impl Newline {
    pub fn invert(&self) -> Newline {
        Newline {}
    }
}

impl fmt::Display for Newline {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        // `writeln!` adds `\n` (no `\r`) on all platforms, so it is safe to use.
        writeln!(f)
    }
}