{"id":21493062,"url":"https://github.com/ansinitro/ansisorting","last_synced_at":"2025-03-17T11:40:49.958Z","repository":{"id":234969816,"uuid":"789831276","full_name":"ansinitro/ansisorting","owner":"ansinitro","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-24T13:03:08.000Z","size":302,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T21:19:30.904Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ansinitro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-21T17:10:44.000Z","updated_at":"2024-06-24T13:03:12.000Z","dependencies_parsed_at":"2024-04-21T22:48:07.515Z","dependency_job_id":"ce8bfcc4-07e4-4a26-adbc-e7c26f762574","html_url":"https://github.com/ansinitro/ansisorting","commit_stats":null,"previous_names":["ansinitro/sorting-functions","ansinitro/sorting-functions-rust"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansinitro%2Fansisorting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansinitro%2Fansisorting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansinitro%2Fansisorting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansinitro%2Fansisorting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ansinitro","download_url":"https://codeload.github.com/ansinitro/ansisorting/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244029425,"owners_count":20386403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T15:37:10.207Z","updated_at":"2025-03-17T11:40:49.936Z","avatar_url":"https://github.com/ansinitro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sorting Library\n\n- This Rust library offers different sorting algorithms. It's flexible enough to sort any types that can be compared(`PartialOrd`) and copied(`Clone`, only for mergesort). The supported algorithms include Quick Sort, Selection Sort, Insertion Sort, and Merge Sort\n\n## Getting started\n\n### Presqurities :\n - Make sure you have Rust and Cargo installed on your computer. You can install them by following the instructions provided on the official Rust website: https://www.rust-lang.org/tools/install\n\n### Installing (Usage) :\n\nTo utilize this library, include it as a dependency in your Rust project's `Cargo.toml` file:\n\n```toml\n[dependencies]\nansisorting = { git = \"https://github.com/ansinitro/ansisorting.git\" }\n```\n\n### Demo\n\nHere's a demonstration my sorting library:\n\n![Cargo.toml file](./toml_example.png)\n\n![Main Sorting](./main_example.png)\n\n### Examples \nSort i32:\n```rust\nextern crate ansisorting;\n\nuse ansisorting::sorting::{selectionsort, quicksort, insertionsort, mergesort};\n\nfn main() {\n    let mut numbers = vec![4, 2, 1, 3];\n    let compare_asc = |a: \u0026i32, b: \u0026i32| a \u003c b;\n    selectionsort::selection_sort(\u0026mut numbers, \u0026compare_asc);\n    println!(\"Sorted numbers: {:?}\", numbers);\n}\n```\n\nSort Person struct:\n```rust\nextern crate ansisorting;\n\nuse ansisorting::sorting::{selectionsort, quicksort, insertionsort, mergesort};\n\n#[derive(Debug, PartialEq, PartialOrd, Clone)]\nstruct Person {\n    name: String,\n    age: u32,\n}\n\nfn main() {\n    let mut people = vec![\n        Person { name: \"Alice\".to_string(), age: 25 },\n        Person { name: \"Bob\".to_string(), age: 20 },\n        Person { name: \"Charlie\".to_string(), age: 30 },\n    ];\n    let compare_by_age = |a: \u0026Person, b: \u0026Person| a.age \u003c b.age;\n    quicksort::quick_sort(\u0026mut people, \u0026compare_by_age);\n    println!(\"Sorted people: {:?}\", people);\n}\n```\n\n### License \n- This project is licensed under the MIT License - see the LICENSE.md file for details.\n\n### Authors \n- ansinitro - ansisorting - [ansinitro](https://github.com/ansinitro/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansinitro%2Fansisorting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fansinitro%2Fansisorting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansinitro%2Fansisorting/lists"}