1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 13:37:48 +00:00

deriving is now called derive

This commit is contained in:
Michael Gehring 2015-01-08 13:56:41 +01:00
parent 1b381f49fa
commit 074a58eafd
11 changed files with 14 additions and 14 deletions

View file

@ -81,7 +81,7 @@ pub fn uumain(args: Vec<String>) -> int {
0 0
} }
#[deriving(Eq, PartialEq)] #[derive(Eq, PartialEq)]
enum NumberingMode { enum NumberingMode {
NumberNone, NumberNone,
NumberNonEmpty, NumberNonEmpty,

View file

@ -22,7 +22,7 @@ use getopts::{
usage, usage,
}; };
#[deriving(Eq, PartialEq)] #[derive(Eq, PartialEq)]
pub enum Mode { pub enum Mode {
Copy, Copy,
Help, Help,

View file

@ -191,7 +191,7 @@ fn cut_characters<R: Reader>(reader: R,
0 0
} }
#[deriving(Clone)] #[derive(Clone)]
struct Searcher<'a> { struct Searcher<'a> {
haystack: &'a [u8], haystack: &'a [u8],
needle: &'a [u8], needle: &'a [u8],

View file

@ -9,7 +9,7 @@
use std; use std;
#[deriving(PartialEq,Eq,PartialOrd,Ord,Show)] #[derive(PartialEq,Eq,PartialOrd,Ord,Show)]
pub struct Range { pub struct Range {
pub low: uint, pub low: uint,
pub high: uint, pub high: uint,

View file

@ -23,7 +23,7 @@ mod util;
static NAME: &'static str = "echo"; static NAME: &'static str = "echo";
static VERSION: &'static str = "1.0.0"; static VERSION: &'static str = "1.0.0";
#[deriving(Clone)] #[derive(Clone)]
struct EchoOptions { struct EchoOptions {
newline: bool, newline: bool,
escape: bool escape: bool

View file

@ -30,7 +30,7 @@ fn char_width(c: char) -> uint {
// lines with PSKIP, lacking PREFIX, or which are entirely blank are // lines with PSKIP, lacking PREFIX, or which are entirely blank are
// NoFormatLines; otherwise, they are FormatLines // NoFormatLines; otherwise, they are FormatLines
#[deriving(Show)] #[derive(Show)]
pub enum Line { pub enum Line {
FormatLine(FileLine), FormatLine(FileLine),
NoFormatLine(String, bool) NoFormatLine(String, bool)
@ -56,7 +56,7 @@ impl Line {
// each line's prefix has to be considered to know whether to merge it with // each line's prefix has to be considered to know whether to merge it with
// the next line or not // the next line or not
#[deriving(Show)] #[derive(Show)]
struct FileLine { struct FileLine {
line : String, line : String,
indent_end : uint, // the end of the indent, always the start of the text indent_end : uint, // the end of the indent, always the start of the text
@ -195,7 +195,7 @@ impl<'a> Iterator<Line> for FileLines<'a> {
// plus info about the paragraph's indentation // plus info about the paragraph's indentation
// (but we only retain the String from the FileLine; the other info // (but we only retain the String from the FileLine; the other info
// is only there to help us in deciding how to merge lines into Paragraphs // is only there to help us in deciding how to merge lines into Paragraphs
#[deriving(Show)] #[derive(Show)]
pub struct Paragraph { pub struct Paragraph {
lines : Vec<String>, // the lines of the file lines : Vec<String>, // the lines of the file
pub init_str : String, // string representing the init, that is, the first line's indent pub init_str : String, // string representing the init, that is, the first line's indent

View file

@ -42,7 +42,7 @@ pub struct Behaviour {
verbose: bool, verbose: bool,
} }
#[deriving(Eq, PartialEq)] #[derive(Eq, PartialEq)]
pub enum OverwriteMode { pub enum OverwriteMode {
NoClobber, NoClobber,
Interactive, Interactive,
@ -51,7 +51,7 @@ pub enum OverwriteMode {
impl Copy for OverwriteMode {} impl Copy for OverwriteMode {}
#[deriving(Eq, PartialEq)] #[derive(Eq, PartialEq)]
pub enum BackupMode { pub enum BackupMode {
NoBackup, NoBackup,
SimpleBackup, SimpleBackup,

View file

@ -19,7 +19,7 @@ use std::io::fs::PathExtensions;
#[macro_use] #[macro_use]
mod util; mod util;
#[deriving(Eq, PartialEq)] #[derive(Eq, PartialEq)]
enum InteractiveMode { enum InteractiveMode {
InteractiveNone, InteractiveNone,
InteractiveOnce, InteractiveOnce,

View file

@ -14,7 +14,7 @@ mod util;
static NAME: &'static str = "seq"; static NAME: &'static str = "seq";
#[deriving(Clone)] #[derive(Clone)]
struct SeqOptions { struct SeqOptions {
separator: String, separator: String,
terminator: Option<String>, terminator: Option<String>,

View file

@ -303,7 +303,7 @@ fn setup_hashmap<'a>() -> HashMap<&'a [u8], Precedence> {
hashmap hashmap
} }
#[deriving(Eq, PartialEq)] #[derive(Eq, PartialEq)]
enum PathCondition { enum PathCondition {
BlockSpecial, BlockSpecial,
CharacterSpecial, CharacterSpecial,

View file

@ -20,7 +20,7 @@ use std::io::fs::PathExtensions;
#[macro_use] #[macro_use]
mod util; mod util;
#[deriving(Eq, PartialEq)] #[derive(Eq, PartialEq)]
enum TruncateMode { enum TruncateMode {
Reference, Reference,
Extend, Extend,