Adjust getter fn naming.
This commit is contained in:
parent
1dc178a7b2
commit
133b290ae6
2 changed files with 5 additions and 4 deletions
|
@ -400,8 +400,9 @@ pub fn test_cardholder_cert(
|
||||||
println!();
|
println!();
|
||||||
|
|
||||||
match ca.cardholder_certificate() {
|
match ca.cardholder_certificate() {
|
||||||
Ok(res) => out
|
Ok(res) => {
|
||||||
.push(TestResult::Text(format!("got cert {:x?}", res.get_data()))),
|
out.push(TestResult::Text(format!("got cert {:x?}", res.data())))
|
||||||
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
out.push(TestResult::Text(format!(
|
out.push(TestResult::Text(format!(
|
||||||
"get_cardholder_certificate failed: {:?}",
|
"get_cardholder_certificate failed: {:?}",
|
||||||
|
@ -429,7 +430,7 @@ pub fn test_cardholder_cert(
|
||||||
let res = ca.cardholder_certificate()?;
|
let res = ca.cardholder_certificate()?;
|
||||||
out.push(TestResult::Text("get cert ok".to_string()));
|
out.push(TestResult::Text("get cert ok".to_string()));
|
||||||
|
|
||||||
if res.get_data() != data {
|
if res.data() != data {
|
||||||
out.push(TestResult::Text(format!(
|
out.push(TestResult::Text(format!(
|
||||||
"get after set doesn't match original data: {:x?}",
|
"get after set doesn't match original data: {:x?}",
|
||||||
data
|
data
|
||||||
|
|
|
@ -16,7 +16,7 @@ pub struct Response {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Response {
|
impl Response {
|
||||||
pub fn get_data(&self) -> &[u8] {
|
pub fn data(&self) -> &[u8] {
|
||||||
&self.data
|
&self.data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue