Connect applications to schemes, filetypes, and more on macOS (more to come)
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

fixed all clippy lints

+6 -19
+2 -4
infat-cli/src/main.rs
··· 1 - // infat-cli/src/main.rs - COMPLETE IMPLEMENTATION 1 + // infat-cli/src/main.rs 2 2 use clap::{Parser, Subcommand}; 3 3 use color_eyre::{ 4 4 eyre::{Context, Result}, 5 5 owo_colors::OwoColorize, 6 6 }; 7 - use infat_lib::{ 8 - app, association, config, macos::launch_services_db, GlobalOptions, 9 - }; 7 + use infat_lib::{app, association, config, macos::launch_services_db, GlobalOptions}; 10 8 use std::path::PathBuf; 11 9 use tracing::info; 12 10
+1 -1
infat-lib/src/lib.rs
··· 1 - // infat-lib/src/lib.rs - FINAL VERSION 1 + #![allow(unexpected_cfgs)] 2 2 //! Infat - Declarative macOS file association and URL scheme management 3 3 //! 4 4 //! This library provides functionality to inspect and modify default applications
+1 -6
infat-lib/src/macos/ffi.rs
··· 1 1 // infat-lib/src/macos/ffi.rs 2 2 //! Raw FFI bindings to macOS Launch Services and related APIs 3 3 4 - use core_foundation::{ 5 - array::CFArrayRef, 6 - base::OSStatus, 7 - string::CFStringRef, 8 - url::CFURLRef, 9 - }; 4 + use core_foundation::{array::CFArrayRef, base::OSStatus, string::CFStringRef, url::CFURLRef}; 10 5 11 6 pub type LSRolesMask = u32; 12 7 pub const K_LS_ROLES_VIEWER: LSRolesMask = 2;
+1 -6
infat-lib/src/macos/launch_services.rs
··· 3 3 4 4 use super::ffi::*; 5 5 use crate::error::{InfatError, Result}; 6 - use core_foundation::{ 7 - array::CFArray, 8 - base::TCFType, 9 - string::CFString, 10 - url::CFURL, 11 - }; 6 + use core_foundation::{array::CFArray, base::TCFType, string::CFString, url::CFURL}; 12 7 use std::path::Path; 13 8 use tracing::debug; 14 9
+1 -1
infat-lib/src/macos/workspace.rs
··· 3 3 4 4 use crate::error::{InfatError, Result}; 5 5 use objc::{class, msg_send, runtime::Object, sel, sel_impl}; 6 - use objc_foundation::{INSObject, INSString, NSString}; 6 + use objc_foundation::{INSString, NSString}; 7 7 use std::path::{Path, PathBuf}; 8 8 use tracing::debug; 9 9
-1
infat-lib/src/uti.rs
··· 386 386 match normalized.as_str() { 387 387 "text" => Ok(Self::Text), 388 388 "plain-text" => Ok(Self::PlainText), 389 - "csv" => Ok(Self::Csv), 390 389 "json" => Ok(Self::Json), 391 390 "xml" => Ok(Self::Xml), 392 391 "yaml" => Ok(Self::Yaml),