Hello everyone,
I am testing the fs crate to create a file and create another file with the same content manually. But I notice that the capacity of the file that created manually always bigger than the file created by Rust.
The code to export file from Rust as following:
let file_ini_content = "[IED General]
IEDAddressing=CopyPrefix
[IED Slave]
UnitParameterA=0
UnitParameterB=IEDStatus
UnitParameterC=IEDErrorCount
UnitParameterD=0
UnitParameterE=0
UnitParameterF=0
UnitParameterG=0
UnitParameterH=0
UnitParameterI=0
UnitParameterJ=0
[IED Master]
StatusPointName=IEDStatus
PercentagePointName=IEDPercentage
TotalMsgCountPointName=IEDTotalMsgCount
GoodMsgCountPointName=IEDGoodMsgCount
BadMsgCountPointName=IEDBadMsgCount
TimeoutCountPointName=IEDTimeoutCount
FastScanPointName=IEDFastScan
PortSwitchPointName=IEDPortSwitch
SendMsgCountPointName=IEDSendMsgCount".to_string();
let mut file_ini = File::create("test.iedini").unwrap();
file_ini.write_all(file_ini_content.as_bytes()).unwrap();
Could you help me to explain this?