keinsell / neuronek

🧬 Intelligent dosage tracker application with purpose to monitor supplements, nootropics and psychoactive substances along with their long-term influence on one's mind and body.
https://neuronek.up.railway.app/reference
Do What The F*ck You Want To Public License
11 stars 2 forks source link

CLI will crash when no space between dosage amount and dosage unit was given #490

Open keinsell opened 4 weeks ago

keinsell commented 4 weeks ago
> keinsell@pop-os:~$ neuronek ingestion create --substance-name "caffeine" --route-of-administration "Oral" --dosage "120mg"
thread 'main' panicked at src/ingestion_analyzer.rs:103:67:
called `Result::unwrap()` on an `Err` value: NoSeparator
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)

> keinsell@pop-os:~$ neuronek ingestion create --substance-name "caffeine" --route-of-administration "Oral" --dosage "120 mg"
"common"
IngestionAnalysis {
    substance_name: "Caffeine",
    route_of_administration_classification: Oral,
    dosage_analysis: Some(
        DosageAnalysis {
            dosage_classification: Unknown,
        },
    ),
}
Ingestion created with ID: 32
linear[bot] commented 4 weeks ago

NEU-39 CLI will crash when no space between dosage amount and dosage unit was given