aboutsummaryrefslogtreecommitdiff
path: root/libs/nres/src/converter.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-02-04 23:37:59 +0300
committerValentin Popov <valentin@popov.link>2026-02-04 23:37:59 +0300
commitafe6b9a29b1f4b5f116a96fa42ee929e32e530e3 (patch)
treec0f79ef65772e1d66c9bc2d829e6afc74539131c /libs/nres/src/converter.rs
parent6a46fe98258f471311810c214bdd07fbc557c1ac (diff)
downloadfparkan-afe6b9a29b1f4b5f116a96fa42ee929e32e530e3.tar.xz
fparkan-afe6b9a29b1f4b5f116a96fa42ee929e32e530e3.zip
feat: remove Rust project
Diffstat (limited to 'libs/nres/src/converter.rs')
-rw-r--r--libs/nres/src/converter.rs30
1 files changed, 0 insertions, 30 deletions
diff --git a/libs/nres/src/converter.rs b/libs/nres/src/converter.rs
deleted file mode 100644
index c059fae..0000000
--- a/libs/nres/src/converter.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-use crate::error::ConverterError;
-
-/// Method for converting u32 to u64.
-pub fn u32_to_u64(value: u32) -> Result<u64, ConverterError> {
- Ok(u64::from(value))
-}
-
-/// Method for converting u32 to usize.
-pub fn u32_to_usize(value: u32) -> Result<usize, ConverterError> {
- match usize::try_from(value) {
- Err(error) => Err(ConverterError::TryFromIntError(error)),
- Ok(result) => Ok(result),
- }
-}
-
-/// Method for converting u64 to u32.
-pub fn u64_to_u32(value: u64) -> Result<u32, ConverterError> {
- match u32::try_from(value) {
- Err(error) => Err(ConverterError::TryFromIntError(error)),
- Ok(result) => Ok(result),
- }
-}
-
-/// Method for converting usize to u32.
-pub fn usize_to_u32(value: usize) -> Result<u32, ConverterError> {
- match u32::try_from(value) {
- Err(error) => Err(ConverterError::TryFromIntError(error)),
- Ok(result) => Ok(result),
- }
-}