mirror of
https://gitee.com/openharmony/third_party_rust_nom
synced 2024-11-27 01:30:32 +00:00
SHow is now named Debug
This commit is contained in:
parent
75b9be3bd0
commit
d97eb90718
@ -419,9 +419,9 @@ mod tests {
|
||||
use internal::IResult;
|
||||
use internal::IResult::*;
|
||||
use std::str;
|
||||
use std::fmt::Show;
|
||||
use std::fmt::Debug;
|
||||
|
||||
fn local_print<'a,T: Show>(input: T) -> IResult<T, ()> {
|
||||
fn local_print<'a,T: Debug>(input: T) -> IResult<T, ()> {
|
||||
println!("{:?}", input);
|
||||
Done(input, ())
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
extern crate collections;
|
||||
|
||||
use std::fmt::Show;
|
||||
use std::fmt::Debug;
|
||||
use internal::*;
|
||||
use internal::IResult::*;
|
||||
|
||||
@ -148,7 +148,7 @@ macro_rules! alt_parser (
|
||||
)
|
||||
);
|
||||
|
||||
pub fn print<'a,T: Show>(input: T) -> IResult<T, ()> {
|
||||
pub fn print<'a,T: Debug>(input: T) -> IResult<T, ()> {
|
||||
println!("{:?}", input);
|
||||
Done(input, ())
|
||||
}
|
||||
@ -524,7 +524,7 @@ mod tests {
|
||||
assert_eq!(res, Done(v2.as_slice(), ()));
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Eq,Show)]
|
||||
#[derive(PartialEq,Eq,Debug)]
|
||||
struct B {
|
||||
a: u8,
|
||||
b: u8
|
||||
|
@ -4,7 +4,7 @@ use self::ProducerState::*;
|
||||
use std::io::fs::File;
|
||||
use std::io::{IoResult, IoErrorKind};
|
||||
|
||||
#[derive(Show,PartialEq,Eq)]
|
||||
#[derive(Debug,PartialEq,Eq)]
|
||||
pub enum ProducerState<O> {
|
||||
Eof(O),
|
||||
Continue,
|
||||
@ -136,11 +136,11 @@ mod tests {
|
||||
use super::*;
|
||||
use internal::IResult;
|
||||
use internal::IResult::*;
|
||||
use std::fmt::Show;
|
||||
use std::fmt::Debug;
|
||||
use std::str;
|
||||
use map::*;
|
||||
|
||||
fn local_print<'a,T: Show>(input: T) -> IResult<T, ()> {
|
||||
fn local_print<'a,T: Debug>(input: T) -> IResult<T, ()> {
|
||||
println!("{:?}", input);
|
||||
Done(input, ())
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ use nom::{IResult,Producer,FileProducer,ProducerState,FlatMapper,Mapper,Mapper2,
|
||||
use nom::IResult::*;
|
||||
|
||||
use std::str;
|
||||
use std::fmt::Show;
|
||||
use std::fmt::Debug;
|
||||
|
||||
#[test]
|
||||
fn map_test_x() {
|
||||
@ -31,7 +31,7 @@ fn tag() {
|
||||
});
|
||||
}
|
||||
|
||||
pub fn print<'a,T: Show>(input: T) -> IResult<T, ()> {
|
||||
pub fn print<'a,T: Debug>(input: T) -> IResult<T, ()> {
|
||||
println!("{:?}", input);
|
||||
Done(input, ())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user