fake: fake commit for exercising

This commit is contained in:
Florian Briand 2024-07-29 21:43:47 +02:00
parent e8529a227c
commit 9408990869
Signed by: florian_briand
GPG Key ID: CC981B9E6B98E70B
2 changed files with 119 additions and 4 deletions

View File

@ -3,4 +3,5 @@ mod libssv;
fn main() { fn main() {
ssvlib_demo::demo(); ssvlib_demo::demo();
// XXX
} }

View File

@ -70,7 +70,7 @@ struct SituationPS {
code_agrement_2: String, code_agrement_2: String,
code_agrement_3: String, code_agrement_3: String,
habilitation_à_signer_une_facture: String, habilitation_à_signer_une_facture: String,
habilitation_à_signer_un_lot: String habilitation_à_signer_un_lot: String,
} }
impl Default for SituationPS { impl Default for SituationPS {
@ -96,7 +96,7 @@ impl Default for SituationPS {
code_agrement_2: String::new(), code_agrement_2: String::new(),
code_agrement_3: String::new(), code_agrement_3: String::new(),
habilitation_à_signer_une_facture: String::new(), habilitation_à_signer_une_facture: String::new(),
habilitation_à_signer_un_lot: String::new() habilitation_à_signer_un_lot: String::new(),
} }
} }
} }
@ -213,7 +213,8 @@ pub fn decode_zone_memoire(bytes: &[u8]) {
String::from_utf8_lossy(&bytes_champ).to_string(); String::from_utf8_lossy(&bytes_champ).to_string();
} }
6 => { 6 => {
carte_ps.titulaire.nom_du_ps = String::from_utf8_lossy(&bytes_champ).to_string(); carte_ps.titulaire.nom_du_ps =
String::from_utf8_lossy(&bytes_champ).to_string();
} }
7 => { 7 => {
carte_ps.titulaire.prenom_du_ps = carte_ps.titulaire.prenom_du_ps =
@ -227,12 +228,125 @@ pub fn decode_zone_memoire(bytes: &[u8]) {
2 => match num_champ { 2 => match num_champ {
1 => { 1 => {
carte_ps.situations.push(SituationPS::default()); carte_ps.situations.push(SituationPS::default());
carte_ps.situations.last_mut().unwrap().numero_logique_de_la_situation_de_facturation_du_ps = bytes_champ[0]; carte_ps
.situations
.last_mut()
.unwrap()
.numero_logique_de_la_situation_de_facturation_du_ps =
bytes_champ[0];
} }
2 => { 2 => {
carte_ps.situations.last_mut().unwrap().mode_d_exercice = carte_ps.situations.last_mut().unwrap().mode_d_exercice =
String::from_utf8_lossy(&bytes_champ).to_string(); String::from_utf8_lossy(&bytes_champ).to_string();
} }
3 => {
carte_ps.situations.last_mut().unwrap().statut_d_exercice =
String::from_utf8_lossy(&bytes_champ).to_string();
}
4 => {
carte_ps.situations.last_mut().unwrap().secteur_d_activite =
String::from_utf8_lossy(&bytes_champ).to_string();
}
5 => {
carte_ps
.situations
.last_mut()
.unwrap()
.type_d_identification_structure =
String::from_utf8_lossy(&bytes_champ).to_string();
}
6 => {
carte_ps
.situations
.last_mut()
.unwrap()
.numero_d_identification_structure =
String::from_utf8_lossy(&bytes_champ).to_string();
}
7 => {
carte_ps
.situations
.last_mut()
.unwrap()
.cle_du_numero_d_identification_structure =
String::from_utf8_lossy(&bytes_champ).to_string();
}
8 => {
carte_ps
.situations
.last_mut()
.unwrap()
.raison_sociale_structure =
String::from_utf8_lossy(&bytes_champ).to_string();
}
9 => {
carte_ps
.situations
.last_mut()
.unwrap()
.numero_d_identification_de_facturation_du_ps =
String::from_utf8_lossy(&bytes_champ).to_string();
}
10 => {
carte_ps
.situations
.last_mut()
.unwrap()
.cle_du_numero_d_identification_de_facturation_du_ps =
String::from_utf8_lossy(&bytes_champ).to_string();
}
11 => {
carte_ps
.situations
.last_mut()
.unwrap()
.numero_d_identification_du_ps_remplaçant =
String::from_utf8_lossy(&bytes_champ).to_string();
}
12 => {
carte_ps
.situations
.last_mut()
.unwrap()
.cle_du_numero_d_identification_du_ps_remplaçant =
String::from_utf8_lossy(&bytes_champ).to_string();
}
13 => {
carte_ps.situations.last_mut().unwrap().code_conventionnel =
String::from_utf8_lossy(&bytes_champ).to_string();
}
14 => {
carte_ps.situations.last_mut().unwrap().code_specialite =
String::from_utf8_lossy(&bytes_champ).to_string();
}
15 => {
carte_ps.situations.last_mut().unwrap().code_zone_tarifaire =
String::from_utf8_lossy(&bytes_champ).to_string();
}
16 => {
carte_ps.situations.last_mut().unwrap().code_zone_ik =
String::from_utf8_lossy(&bytes_champ).to_string();
}
17 => {
carte_ps.situations.last_mut().unwrap().code_agrement_1 =
String::from_utf8_lossy(&bytes_champ).to_string();
}
18 => {
carte_ps.situations.last_mut().unwrap().code_agrement_2 =
String::from_utf8_lossy(&bytes_champ).to_string();
}
19 => {
carte_ps.situations.last_mut().unwrap().code_agrement_3 =
String::from_utf8_lossy(&bytes_champ).to_string();
}
20 => {
carte_ps.situations.last_mut().unwrap().habilitation_à_signer_une_facture =
String::from_utf8_lossy(&bytes_champ).to_string();
}
21 => {
carte_ps.situations.last_mut().unwrap().habilitation_à_signer_un_lot =
String::from_utf8_lossy(&bytes_champ).to_string();
}
_ => (), _ => (),
}, },
_ => (), _ => (),