1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

body members are now called method and data (according to spec)

This commit is contained in:
lurchi 2016-09-10 19:55:52 +02:00
parent f146435e99
commit 27dc1292ba

View file

@ -59,18 +59,18 @@ pub enum PsycParserResult<'a> {
value_part: &'a [u8] value_part: &'a [u8]
}, },
Body { Body {
name: &'a [u8], method: &'a [u8],
value: &'a [u8] data: &'a [u8]
}, },
BodyStart { BodyStart {
name: &'a [u8], method: &'a [u8],
value_part: &'a [u8] data_part: &'a [u8]
}, },
BodyCont { BodyCont {
value_part: &'a [u8] data_part: &'a [u8]
}, },
BodyEnd { BodyEnd {
value_part: &'a [u8] data_part: &'a [u8]
} }
} }
@ -207,29 +207,29 @@ impl PsycParser {
PsycParseRC::PSYC_PARSE_BODY => { PsycParseRC::PSYC_PARSE_BODY => {
let result = PsycParserResult::Body { let result = PsycParserResult::Body {
name: util::cstring_to_slice(name.data, name.length), method: util::cstring_to_slice(name.data, name.length),
value: util::cstring_to_slice(value.data, value.length) data: util::cstring_to_slice(value.data, value.length)
}; };
Ok(result) Ok(result)
}, },
PsycParseRC::PSYC_PARSE_BODY_START => { PsycParseRC::PSYC_PARSE_BODY_START => {
let result = PsycParserResult::BodyStart { let result = PsycParserResult::BodyStart {
name: util::cstring_to_slice(name.data, name.length), method: util::cstring_to_slice(name.data, name.length),
value_part: util::cstring_to_slice(value.data, value.length) data_part: util::cstring_to_slice(value.data, value.length)
}; };
Ok(result) Ok(result)
}, },
PsycParseRC::PSYC_PARSE_BODY_CONT => { PsycParseRC::PSYC_PARSE_BODY_CONT => {
let result = PsycParserResult::BodyCont { let result = PsycParserResult::BodyCont {
value_part: util::cstring_to_slice(value.data, value.length) data_part: util::cstring_to_slice(value.data, value.length)
}; };
Ok(result) Ok(result)
}, },
PsycParseRC::PSYC_PARSE_BODY_END => { PsycParseRC::PSYC_PARSE_BODY_END => {
let result = PsycParserResult::BodyEnd { let result = PsycParserResult::BodyEnd {
value_part: util::cstring_to_slice(value.data, value.length) data_part: util::cstring_to_slice(value.data, value.length)
}; };
Ok(result) Ok(result)
} }