deprecate old code

This commit is contained in:
Brandon Thomas committed 2026-03-18 12:17:54 -04:00
1 parent f9c1201fc6
commit beac08b2f6
7 files changed
+14 -8

No files matched your search

@@ -43,7 +43,7 @@ use artcraft_client::endpoints::media_files::upload_video_media_file_from_file::
use artcraft_client::endpoints::prompts::create_prompt::create_prompt;
use tauri::AppHandle;
use tempdir::TempDir;
use url_utils::extension::extract_download_extension_from_url::{extract_download_extension_from_url, extract_download_extension_from_url_str};
use url_utils::download_extension::extract_download_extension_from_url::{extract_download_extension_from_url, extract_download_extension_from_url_str};
pub struct SuccessfulGeneration {
pub prompt: Option<String>,
@@ -57,7 +57,7 @@ use artcraft_client::recipes::upload_media_file_from_file::upload_media_file_fro
use tauri::AppHandle;
use tokens::tokens::batch_generations::BatchGenerationToken;
use url::Url;
use url_utils::extension::extract_download_extension_from_url::extract_download_extension_from_url_str;
use url_utils::download_extension::extract_download_extension_from_url::extract_download_extension_from_url_str;
use world_labs_client::api::api_types::world_id::WorldObjectId;
use world_labs_client::api::requests::worlds::poll_world_status::{poll_world_status, PollWorldStatusArgs};
use world_labs_client::credentials::world_labs_bearer_token::WorldLabsBearerToken;
@@ -1,5 +1,6 @@
/// When downloading a remote file, it makes sense to try to match the same file extension (with reasonable safeguards).
#[deprecated(note = "Use `Extension` in `url_utils::extension::extension` instead")]
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub enum DownloadExtension {
// Image
@@ -1,13 +1,15 @@
use crate::extension::download_extension::DownloadExtension;
use crate::download_extension::DownloadExtension;
use url::Url;
/// This should be used for naming files on the local file system based on their URL.
#[deprecated(note = "Use `extract_extension_from_url_str` in `url_utils::extension::extract_extension_from_url` instead")]
pub fn extract_download_extension_from_url_str(url: &str) -> Option<DownloadExtension> {
let parsed_url = Url::parse(url).ok()?;
extract_download_extension_from_url(&parsed_url)
}
/// This should be used for naming files on the local file system based on their URL.
#[deprecated(note = "Use `extract_extension_from_url` in `url_utils::extension::extract_extension_from_url` instead")]
pub fn extract_download_extension_from_url(url: &Url) -> Option<DownloadExtension> {
let path = url.path();
let extension = std::path::Path::new(path)
@@ -18,8 +20,8 @@ pub fn extract_download_extension_from_url(url: &Url) -> Option<DownloadExtensio
#[cfg(test)]
mod tests {
use crate::extension::download_extension::DownloadExtension;
use crate::extension::extract_download_extension_from_url::extract_download_extension_from_url_str;
use crate::download_extension::DownloadExtension;
use crate::download_extension::extract_download_extension_from_url::extract_download_extension_from_url_str;
#[test]
fn success_case() {
@@ -0,0 +1,4 @@
mod download_extension;
pub mod extract_download_extension_from_url;
pub use download_extension::DownloadExtension;
@@ -1,4 +1,2 @@
pub mod download_extension;
pub mod extension;
pub mod extract_download_extension_from_url;
pub mod extract_extension_from_url;
+2 -1
View File
@@ -1 +1,2 @@
pub mod extension;
pub mod extension;
pub mod download_extension;