Adjust getter fn naming.

This commit is contained in:
Heiko Schaefer 2021-12-02 17:29:30 +01:00
parent 1dc178a7b2
commit 133b290ae6
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D
2 changed files with 5 additions and 4 deletions

View file

@ -400,8 +400,9 @@ pub fn test_cardholder_cert(
println!();
match ca.cardholder_certificate() {
Ok(res) => out
.push(TestResult::Text(format!("got cert {:x?}", res.get_data()))),
Ok(res) => {
out.push(TestResult::Text(format!("got cert {:x?}", res.data())))
}
Err(e) => {
out.push(TestResult::Text(format!(
"get_cardholder_certificate failed: {:?}",
@ -429,7 +430,7 @@ pub fn test_cardholder_cert(
let res = ca.cardholder_certificate()?;
out.push(TestResult::Text("get cert ok".to_string()));
if res.get_data() != data {
if res.data() != data {
out.push(TestResult::Text(format!(
"get after set doesn't match original data: {:x?}",
data

View file

@ -16,7 +16,7 @@ pub struct Response {
}
impl Response {
pub fn get_data(&self) -> &[u8] {
pub fn data(&self) -> &[u8] {
&self.data
}
}