File: mod.rs

package info (click to toggle)
rust-codepage-437 0.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 332 kB
  • sloc: makefile: 4
file content (18 lines) | stat: -rw-r--r-- 466 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::borrow::Cow;

mod decode;
mod encode;


const ALL_UTF8: &str = include_str!("../../test-data/cp437_control/all.utf8");

const VARIANTS_CP437: &[u8] = include_bytes!("../../test-data/cp437_control/variants.cp437");
const VARIANTS_UTF8: &str = include_str!("../../test-data/cp437_control/variants.utf8");


fn is_borrowed<T: ToOwned + ?Sized>(who: &Cow<T>) -> bool {
    match who {
        &Cow::Borrowed(_) => true,
        &Cow::Owned(_) => false,
    }
}