mirror of
https://github.com/pcvolkmer/osc-variant.git
synced 2025-04-19 19:56:50 +00:00
feat: add check for files with 'AnalyseBereichEditor'
This commit is contained in:
parent
4fdfb97d75
commit
cd2019332e
@ -404,6 +404,16 @@ impl FromStr for OnkostarEditor {
|
||||
type Err = String;
|
||||
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
if !s
|
||||
.matches("<AnalyseBereichEditor>")
|
||||
.collect::<String>()
|
||||
.is_empty()
|
||||
{
|
||||
return Err(
|
||||
"Datei mit Inhalt 'AnalyseBereichEditor' kann nicht verwendet werden".into(),
|
||||
);
|
||||
}
|
||||
|
||||
match from_str::<OnkostarEditor>(s) {
|
||||
Ok(profile) => Ok(profile),
|
||||
Err(err) => Err(err.to_string()),
|
||||
|
Loading…
x
Reference in New Issue
Block a user