tidely
7bdc99abc1
Fix clippy::redundant_clone
lint violations ( #36558 )
...
This removes around 900 unnecessary clones, ranging from cloning a few
ints all the way to large data structures and images.
A lot of these were fixed using `cargo clippy --fix --workspace
--all-targets`, however it often breaks other lints and needs to be run
again. This was then followed up with some manual fixing.
I understand this is a large diff, but all the changes are pretty
trivial. Rust is doing some heavy lifting here for us. Once I get it up
to speed with main, I'd appreciate this getting merged rather sooner
than later.
Release Notes:
- N/A
2025-08-20 12:20:13 +02:00
Nate Butler
e26620d1cf
gpui: Add a standard text example ( #30747 )
...
This is a dumb first pass at a standard text example. We'll use this to
start digging in to some text/scale rendering issues.
There will be a ton of follow-up features to this, but starting simple.
Release Notes:
- N/A
2025-05-16 17:35:44 +02:00
Julia Ryan
01ec6e0f77
Add workspace-hack ( #27277 )
...
This adds a "workspace-hack" crate, see
[mozilla's](https://hg.mozilla.org/mozilla-central/file/3a265fdc9f33e5946f0ca0a04af73acd7e6d1a39/build/workspace-hack/Cargo.toml#l7 )
for a concise explanation of why this is useful. For us in practice this
means that if I were to run all the tests (`cargo nextest r
--workspace`) and then `cargo r`, all the deps from the previous cargo
command will be reused. Before this PR it would rebuild many deps due to
resolving different sets of features for them. For me this frequently
caused long rebuilds when things "should" already be cached.
To avoid manually maintaining our workspace-hack crate, we will use
[cargo hakari](https://docs.rs/cargo-hakari ) to update the build files
when there's a necessary change. I've added a step to CI that checks
whether the workspace-hack crate is up to date, and instructs you to
re-run `script/update-workspace-hack` when it fails.
Finally, to make sure that people can still depend on crates in our
workspace without pulling in all the workspace deps, we use a `[patch]`
section following [hakari's
instructions](https://docs.rs/cargo-hakari/0.9.36/cargo_hakari/patch_directive/index.html )
One possible followup task would be making guppy use our
`rust-toolchain.toml` instead of having to duplicate that list in its
config, I opened an issue for that upstream: guppy-rs/guppy#481 .
TODO:
- [x] Fix the extension test failure
- [x] Ensure the dev dependencies aren't being unified by Hakari into
the main dependencies
- [x] Ensure that the remote-server binary continues to not depend on
LibSSL
Release Notes:
- N/A
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-04-02 13:26:34 -07:00
Piotr Osiewicz
dc64ec9cc8
chore: Bump Rust edition to 2024 ( #27800 )
...
Follow-up to https://github.com/zed-industries/zed/pull/27791
Release Notes:
- N/A
2025-03-31 20:55:27 +02:00
Marshall Bowers
aceab76ae4
gpui: Rename rounded_md
to rounded_sm
( #26228 )
...
This PR renames the `rounded_md` style method to `rounded_sm`.
Follow up to https://github.com/zed-industries/zed/pull/26221 , which
freed up the `rounded_sm` name.
Release Notes:
- N/A
2025-03-06 17:57:31 +00:00
Nathan Sobo
6fca1d2b0b
Eliminate GPUI View, ViewContext, and WindowContext types ( #22632 )
...
There's still a bit more work to do on this, but this PR is compiling
(with warnings) after eliminating the key types. When the tasks below
are complete, this will be the new narrative for GPUI:
- `Entity<T>` - This replaces `View<T>`/`Model<T>`. It represents a unit
of state, and if `T` implements `Render`, then `Entity<T>` implements
`Element`.
- `&mut App` This replaces `AppContext` and represents the app.
- `&mut Context<T>` This replaces `ModelContext` and derefs to `App`. It
is provided by the framework when updating an entity.
- `&mut Window` Broken out of `&mut WindowContext` which no longer
exists. Every method that once took `&mut WindowContext` now takes `&mut
Window, &mut App` and every method that took `&mut ViewContext<T>` now
takes `&mut Window, &mut Context<T>`
Not pictured here are the two other failed attempts. It's been quite a
month!
Tasks:
- [x] Remove `View`, `ViewContext`, `WindowContext` and thread through
`Window`
- [x] [@cole-miller @mikayla-maki] Redraw window when entities change
- [x] [@cole-miller @mikayla-maki] Get examples and Zed running
- [x] [@cole-miller @mikayla-maki] Fix Zed rendering
- [x] [@mikayla-maki] Fix todo! macros and comments
- [x] Fix a bug where the editor would not be redrawn because of view
caching
- [x] remove publicness window.notify() and replace with
`AppContext::notify`
- [x] remove `observe_new_window_models`, replace with
`observe_new_models` with an optional window
- [x] Fix a bug where the project panel would not be redrawn because of
the wrong refresh() call being used
- [x] Fix the tests
- [x] Fix warnings by eliminating `Window` params or using `_`
- [x] Fix conflicts
- [x] Simplify generic code where possible
- [x] Rename types
- [ ] Update docs
### issues post merge
- [x] Issues switching between normal and insert mode
- [x] Assistant re-rendering failure
- [x] Vim test failures
- [x] Mac build issue
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Joseph <joseph@zed.dev>
Co-authored-by: max <max@zed.dev>
Co-authored-by: Michael Sloan <michael@zed.dev>
Co-authored-by: Mikayla Maki <mikaylamaki@Mikaylas-MacBook-Pro.local>
Co-authored-by: Mikayla <mikayla.c.maki@gmail.com>
Co-authored-by: joão <joao@zed.dev>
2025-01-26 03:02:45 +00:00
Piotr Osiewicz
c9534e8025
chore: Use workspace fields for edition and publish ( #23291 )
...
This prepares us for an upcoming bump to Rust 2024 edition.
Release Notes:
- N/A
2025-01-17 17:39:22 +01:00
Marshall Bowers
8da58bbe3a
story: Use itertools
as a workspace dependency ( #22919 )
...
This PR makes the `story` crate depend on `itertools` as a workspace
dependency.
Release Notes:
- N/A
2025-01-09 21:19:17 +00:00
renovate[bot]
9f9f3d215d
Update Rust crate itertools to v0.14.0 ( #22877 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [itertools](https://redirect.github.com/rust-itertools/itertools ) |
dependencies | minor | `0.13` -> `0.14` |
| [itertools](https://redirect.github.com/rust-itertools/itertools ) |
workspace.dependencies | minor | `0.13.0` -> `0.14.0` |
---
### Release Notes
<details>
<summary>rust-itertools/itertools (itertools)</summary>
###
[`v0.14.0`](https://redirect.github.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0140 )
[Compare
Source](https://redirect.github.com/rust-itertools/itertools/compare/v0.13.0...v0.14.0 )
##### Breaking
- Increased MSRV to 1.63.0
([#​960](https://redirect.github.com/rust-itertools/itertools/issues/960 ))
- Removed generic parameter from `cons_tuples`
([#​988](https://redirect.github.com/rust-itertools/itertools/issues/988 ))
##### Added
- Added `array_combinations`
([#​991](https://redirect.github.com/rust-itertools/itertools/issues/991 ))
- Added `k_smallest_relaxed` and variants
([#​925](https://redirect.github.com/rust-itertools/itertools/issues/925 ))
- Added `next_array` and `collect_array`
([#​560](https://redirect.github.com/rust-itertools/itertools/issues/560 ))
- Implemented `DoubleEndedIterator` for `FilterOk`
([#​948](https://redirect.github.com/rust-itertools/itertools/issues/948 ))
- Implemented `DoubleEndedIterator` for `FilterMapOk`
([#​950](https://redirect.github.com/rust-itertools/itertools/issues/950 ))
##### Changed
- Allow `Q: ?Sized` in `Itertools::contains`
([#​971](https://redirect.github.com/rust-itertools/itertools/issues/971 ))
- Improved hygiene of `chain!`
([#​943](https://redirect.github.com/rust-itertools/itertools/issues/943 ))
- Improved `into_group_map_by` documentation
([#​1000](https://redirect.github.com/rust-itertools/itertools/issues/1000 ))
- Improved `tree_reduce` documentation
([#​955](https://redirect.github.com/rust-itertools/itertools/issues/955 ))
- Improved discoverability of `merge_join_by`
([#​966](https://redirect.github.com/rust-itertools/itertools/issues/966 ))
- Improved discoverability of `take_while_inclusive`
([#​972](https://redirect.github.com/rust-itertools/itertools/issues/972 ))
- Improved documentation of `find_or_last` and `find_or_first`
([#​984](https://redirect.github.com/rust-itertools/itertools/issues/984 ))
- Prevented exponentially large type sizes in `tuple_combinations`
([#​945](https://redirect.github.com/rust-itertools/itertools/issues/945 ))
- Added `track_caller` attr for `asser_equal`
([#​976](https://redirect.github.com/rust-itertools/itertools/issues/976 ))
##### Notable Internal Changes
- Fixed clippy lints
([#​956](https://redirect.github.com/rust-itertools/itertools/issues/956 ),
[#​987](https://redirect.github.com/rust-itertools/itertools/issues/987 ),
[#​1008](https://redirect.github.com/rust-itertools/itertools/issues/1008 ))
- Addressed warnings within doctests
([#​964](https://redirect.github.com/rust-itertools/itertools/issues/964 ))
- CI: Run most tests with miri
([#​961](https://redirect.github.com/rust-itertools/itertools/issues/961 ))
- CI: Speed up "cargo-semver-checks" action
([#​938](https://redirect.github.com/rust-itertools/itertools/issues/938 ))
- Changed an instance of `default_features` in `Cargo.toml` to
`default-features`
([#​985](https://redirect.github.com/rust-itertools/itertools/issues/985 ))
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45Mi4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTIuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-09 17:48:25 +00:00
Piotr Osiewicz
e6c1c51b37
chore: Fix several style lints ( #17488 )
...
It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.
Release Notes:
- N/A
2024-09-06 11:58:39 +02:00
Marshall Bowers
226d683ba4
story: Remove unneeded lib.name
( #17156 )
...
This PR removes the `lib.name` field from the `story` crate's
`Cargo.toml`, as it is not needed.
Release Notes:
- N/A
2024-08-30 09:23:45 -04:00
Nate Butler
6646b15f29
Standardize story
crate lib name ( #17117 )
...
`crates/story/src/lib.rs` -> `crates/story/src/story.rs`
Release Notes:
- N/A
2024-08-29 20:07:39 -04:00
Nate Butler
3d175f685f
Unify Story/StoryContainers ( #17114 )
...
Unify the various Story containers, and use gpui default colors over the
custom `StoryColors`.
Release Notes:
- N/A
2024-08-29 17:27:01 -04:00
renovate[bot]
6c8836ec21
Update Rust crate itertools to v0.13.0 ( #17048 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [itertools](https://togithub.com/rust-itertools/itertools ) |
dependencies | minor | `0.10` -> `0.13` |
| [itertools](https://togithub.com/rust-itertools/itertools ) |
workspace.dependencies | minor | `0.11.0` -> `0.13.0` |
---
### Release Notes
<details>
<summary>rust-itertools/itertools (itertools)</summary>
###
[`v0.13.0`](https://togithub.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0130 )
[Compare
Source](https://togithub.com/rust-itertools/itertools/compare/v0.12.1...v0.13.0 )
##### Breaking
- Removed implementation of `DoubleEndedIterator` for `ConsTuples`
([#​853](https://togithub.com/rust-itertools/itertools/issues/853 ))
- Made `MultiProduct` fused and fixed on an empty iterator
([#​835](https://togithub.com/rust-itertools/itertools/issues/835 ),
[#​834](https://togithub.com/rust-itertools/itertools/issues/834 ))
- Changed `iproduct!` to return tuples for maxi one iterator too
([#​870](https://togithub.com/rust-itertools/itertools/issues/870 ))
- Changed `PutBack::put_back` to return the old value
([#​880](https://togithub.com/rust-itertools/itertools/issues/880 ))
- Removed deprecated `repeat_call, Itertools::{foreach, step,
map_results, fold_results}`
([#​878](https://togithub.com/rust-itertools/itertools/issues/878 ))
- Removed `TakeWhileInclusive::new`
([#​912](https://togithub.com/rust-itertools/itertools/issues/912 ))
##### Added
- Added `Itertools::{smallest_by, smallest_by_key, largest, largest_by,
largest_by_key}`
([#​654](https://togithub.com/rust-itertools/itertools/issues/654 ),
[#​885](https://togithub.com/rust-itertools/itertools/issues/885 ))
- Added `Itertools::tail`
([#​899](https://togithub.com/rust-itertools/itertools/issues/899 ))
- Implemented `DoubleEndedIterator` for `ProcessResults`
([#​910](https://togithub.com/rust-itertools/itertools/issues/910 ))
- Implemented `Debug` for `FormatWith`
([#​931](https://togithub.com/rust-itertools/itertools/issues/931 ))
- Added `Itertools::get`
([#​891](https://togithub.com/rust-itertools/itertools/issues/891 ))
##### Changed
- Deprecated `Itertools::group_by` (renamed `chunk_by`)
([#​866](https://togithub.com/rust-itertools/itertools/issues/866 ),
[#​879](https://togithub.com/rust-itertools/itertools/issues/879 ))
- Deprecated `unfold` (use `std::iter::from_fn` instead)
([#​871](https://togithub.com/rust-itertools/itertools/issues/871 ))
- Optimized `GroupingMapBy`
([#​873](https://togithub.com/rust-itertools/itertools/issues/873 ),
[#​876](https://togithub.com/rust-itertools/itertools/issues/876 ))
- Relaxed `Fn` bounds to `FnMut` in `diff_with,
Itertools::into_group_map_by`
([#​886](https://togithub.com/rust-itertools/itertools/issues/886 ))
- Relaxed `Debug/Clone` bounds for `MapInto`
([#​889](https://togithub.com/rust-itertools/itertools/issues/889 ))
- Documented the `use_alloc` feature
([#​887](https://togithub.com/rust-itertools/itertools/issues/887 ))
- Optimized `Itertools::set_from`
([#​888](https://togithub.com/rust-itertools/itertools/issues/888 ))
- Removed badges in `README.md`
([#​890](https://togithub.com/rust-itertools/itertools/issues/890 ))
- Added "no-std" categories in `Cargo.toml`
([#​894](https://togithub.com/rust-itertools/itertools/issues/894 ))
- Fixed `Itertools::k_smallest` on short unfused iterators
([#​900](https://togithub.com/rust-itertools/itertools/issues/900 ))
- Deprecated `Itertools::tree_fold1` (renamed `tree_reduce`)
([#​895](https://togithub.com/rust-itertools/itertools/issues/895 ))
- Deprecated `GroupingMap::fold_first` (renamed `reduce`)
([#​902](https://togithub.com/rust-itertools/itertools/issues/902 ))
- Fixed `Itertools::k_smallest(0)` to consume the iterator, optimized
`Itertools::k_smallest(1)`
([#​909](https://togithub.com/rust-itertools/itertools/issues/909 ))
- Specialized `Combinations::nth`
([#​914](https://togithub.com/rust-itertools/itertools/issues/914 ))
- Specialized `MergeBy::fold`
([#​920](https://togithub.com/rust-itertools/itertools/issues/920 ))
- Specialized `CombinationsWithReplacement::nth`
([#​923](https://togithub.com/rust-itertools/itertools/issues/923 ))
- Specialized `FlattenOk::{fold, rfold}`
([#​927](https://togithub.com/rust-itertools/itertools/issues/927 ))
- Specialized `Powerset::nth`
([#​924](https://togithub.com/rust-itertools/itertools/issues/924 ))
- Documentation fixes
([#​882](https://togithub.com/rust-itertools/itertools/issues/882 ),
[#​936](https://togithub.com/rust-itertools/itertools/issues/936 ))
- Fixed `assert_equal` for iterators longer than `i32::MAX`
([#​932](https://togithub.com/rust-itertools/itertools/issues/932 ))
- Updated the `must_use` message of non-lazy `KMergeBy` and
`TupleCombinations`
([#​939](https://togithub.com/rust-itertools/itertools/issues/939 ))
##### Notable Internal Changes
- Tested iterator laziness
([#​792](https://togithub.com/rust-itertools/itertools/issues/792 ))
- Created `CONTRIBUTING.md`
([#​767](https://togithub.com/rust-itertools/itertools/issues/767 ))
###
[`v0.12.1`](https://togithub.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0121 )
[Compare
Source](https://togithub.com/rust-itertools/itertools/compare/v0.12.0...v0.12.1 )
##### Added
- Documented iteration order guarantee for
`Itertools::[tuple_]combinations`
([#​822](https://togithub.com/rust-itertools/itertools/issues/822 ))
- Documented possible panic in `iterate`
([#​842](https://togithub.com/rust-itertools/itertools/issues/842 ))
- Implemented `Clone` and `Debug` for `Diff`
([#​845](https://togithub.com/rust-itertools/itertools/issues/845 ))
- Implemented `Debug` for `WithPosition`
([#​859](https://togithub.com/rust-itertools/itertools/issues/859 ))
- Implemented `Eq` for `MinMaxResult`
([#​838](https://togithub.com/rust-itertools/itertools/issues/838 ))
- Implemented `From<EitherOrBoth<A, B>>` for `Option<Either<A, B>>`
([#​843](https://togithub.com/rust-itertools/itertools/issues/843 ))
- Implemented `PeekingNext` for `RepeatN`
([#​855](https://togithub.com/rust-itertools/itertools/issues/855 ))
##### Changed
- Made `CoalesceBy` lazy
([#​801](https://togithub.com/rust-itertools/itertools/issues/801 ))
- Optimized `Filter[Map]Ok::next`, `Itertools::partition`,
`Unique[By]::next[_back]`
([#​818](https://togithub.com/rust-itertools/itertools/issues/818 ))
- Optimized `Itertools::find_position`
([#​837](https://togithub.com/rust-itertools/itertools/issues/837 ))
- Optimized `Positions::next[_back]`
([#​816](https://togithub.com/rust-itertools/itertools/issues/816 ))
- Optimized `ZipLongest::fold`
([#​854](https://togithub.com/rust-itertools/itertools/issues/854 ))
- Relaxed `Debug` bounds for `GroupingMapBy`
([#​860](https://togithub.com/rust-itertools/itertools/issues/860 ))
- Specialized `ExactlyOneError::fold`
([#​826](https://togithub.com/rust-itertools/itertools/issues/826 ))
- Specialized `Interleave[Shortest]::fold`
([#​849](https://togithub.com/rust-itertools/itertools/issues/849 ))
- Specialized `MultiPeek::fold`
([#​820](https://togithub.com/rust-itertools/itertools/issues/820 ))
- Specialized `PadUsing::[r]fold`
([#​825](https://togithub.com/rust-itertools/itertools/issues/825 ))
- Specialized `PeekNth::fold`
([#​824](https://togithub.com/rust-itertools/itertools/issues/824 ))
- Specialized `Positions::[r]fold`
([#​813](https://togithub.com/rust-itertools/itertools/issues/813 ))
- Specialized `PutBackN::fold`
([#​823](https://togithub.com/rust-itertools/itertools/issues/823 ))
- Specialized `RepeatN::[r]fold`
([#​821](https://togithub.com/rust-itertools/itertools/issues/821 ))
- Specialized `TakeWhileInclusive::fold`
([#​851](https://togithub.com/rust-itertools/itertools/issues/851 ))
- Specialized `ZipLongest::rfold`
([#​848](https://togithub.com/rust-itertools/itertools/issues/848 ))
##### Notable Internal Changes
- Added test coverage in CI
([#​847](https://togithub.com/rust-itertools/itertools/issues/847 ),
[#​856](https://togithub.com/rust-itertools/itertools/issues/856 ))
- Added semver check in CI
([#​784](https://togithub.com/rust-itertools/itertools/issues/784 ))
- Enforced `clippy` in CI
([#​740](https://togithub.com/rust-itertools/itertools/issues/740 ))
- Enforced `rustdoc` in CI
([#​840](https://togithub.com/rust-itertools/itertools/issues/840 ))
- Improved specialization tests
([#​807](https://togithub.com/rust-itertools/itertools/issues/807 ))
- More specialization benchmarks
([#​806](https://togithub.com/rust-itertools/itertools/issues/806 ))
###
[`v0.12.0`](https://togithub.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0120 )
[Compare
Source](https://togithub.com/rust-itertools/itertools/compare/v0.11.0...v0.12.0 )
##### Breaking
- Made `take_while_inclusive` consume iterator by value
([#​709](https://togithub.com/rust-itertools/itertools/issues/709 ))
- Added `Clone` bound to `Unique`
([#​777](https://togithub.com/rust-itertools/itertools/issues/777 ))
##### Added
- Added `Itertools::try_len`
([#​723](https://togithub.com/rust-itertools/itertools/issues/723 ))
- Added free function `sort_unstable`
([#​796](https://togithub.com/rust-itertools/itertools/issues/796 ))
- Added `GroupMap::fold_with`
([#​778](https://togithub.com/rust-itertools/itertools/issues/778 ),
[#​785](https://togithub.com/rust-itertools/itertools/issues/785 ))
- Added `PeekNth::{peek_mut, peek_nth_mut}`
([#​716](https://togithub.com/rust-itertools/itertools/issues/716 ))
- Added `PeekNth::{next_if, next_if_eq}`
([#​734](https://togithub.com/rust-itertools/itertools/issues/734 ))
- Added conversion into `(Option<A>,Option<B>)` to `EitherOrBoth`
([#​713](https://togithub.com/rust-itertools/itertools/issues/713 ))
- Added conversion from `Either<A, B>` to `EitherOrBoth<A, B>`
([#​715](https://togithub.com/rust-itertools/itertools/issues/715 ))
- Implemented `ExactSizeIterator` for `Tuples`
([#​761](https://togithub.com/rust-itertools/itertools/issues/761 ))
- Implemented `ExactSizeIterator` for `(Circular)TupleWindows`
([#​752](https://togithub.com/rust-itertools/itertools/issues/752 ))
- Made `EitherOrBoth<T>` a shorthand for `EitherOrBoth<T, T>`
([#​719](https://togithub.com/rust-itertools/itertools/issues/719 ))
##### Changed
- Added missing `#[must_use]` annotations on iterator adaptors
([#​794](https://togithub.com/rust-itertools/itertools/issues/794 ))
- Made `Combinations` lazy
([#​795](https://togithub.com/rust-itertools/itertools/issues/795 ))
- Made `Intersperse(With)` lazy
([#​797](https://togithub.com/rust-itertools/itertools/issues/797 ))
- Made `Permutations` lazy
([#​793](https://togithub.com/rust-itertools/itertools/issues/793 ))
- Made `Product` lazy
([#​800](https://togithub.com/rust-itertools/itertools/issues/800 ))
- Made `TupleWindows` lazy
([#​602](https://togithub.com/rust-itertools/itertools/issues/602 ))
- Specialized `Combinations::{count, size_hint}`
([#​729](https://togithub.com/rust-itertools/itertools/issues/729 ))
- Specialized `CombinationsWithReplacement::{count, size_hint}`
([#​737](https://togithub.com/rust-itertools/itertools/issues/737 ))
- Specialized `Powerset::fold`
([#​765](https://togithub.com/rust-itertools/itertools/issues/765 ))
- Specialized `Powerset::count`
([#​735](https://togithub.com/rust-itertools/itertools/issues/735 ))
- Specialized `TupleCombinations::{count, size_hint}`
([#​763](https://togithub.com/rust-itertools/itertools/issues/763 ))
- Specialized `TupleCombinations::fold`
([#​775](https://togithub.com/rust-itertools/itertools/issues/775 ))
- Specialized `WhileSome::fold`
([#​780](https://togithub.com/rust-itertools/itertools/issues/780 ))
- Specialized `WithPosition::fold`
([#​772](https://togithub.com/rust-itertools/itertools/issues/772 ))
- Specialized `ZipLongest::fold`
([#​774](https://togithub.com/rust-itertools/itertools/issues/774 ))
- Changed `{min, max}_set*` operations require `alloc` feature, instead
of `std`
([#​760](https://togithub.com/rust-itertools/itertools/issues/760 ))
- Improved documentation of `tree_fold1`
([#​787](https://togithub.com/rust-itertools/itertools/issues/787 ))
- Improved documentation of `permutations`
([#​724](https://togithub.com/rust-itertools/itertools/issues/724 ))
- Fixed typo in documentation of `multiunzip`
([#​770](https://togithub.com/rust-itertools/itertools/issues/770 ))
##### Notable Internal Changes
- Improved specialization tests
([#​799](https://togithub.com/rust-itertools/itertools/issues/799 ),
[#​786](https://togithub.com/rust-itertools/itertools/issues/786 ),
[#​782](https://togithub.com/rust-itertools/itertools/issues/782 ))
- Simplified implementation of `Permutations`
([#​739](https://togithub.com/rust-itertools/itertools/issues/739 ),
[#​748](https://togithub.com/rust-itertools/itertools/issues/748 ),
[#​790](https://togithub.com/rust-itertools/itertools/issues/790 ))
- Combined `Merge`/`MergeBy`/`MergeJoinBy` implementations
([#​736](https://togithub.com/rust-itertools/itertools/issues/736 ))
- Simplified `Permutations::size_hint`
([#​739](https://togithub.com/rust-itertools/itertools/issues/739 ))
- Fix wrapping arithmetic in benchmarks
([#​770](https://togithub.com/rust-itertools/itertools/issues/770 ))
- Enforced `rustfmt` in CI
([#​751](https://togithub.com/rust-itertools/itertools/issues/751 ))
- Disallowed compile warnings in CI
([#​720](https://togithub.com/rust-itertools/itertools/issues/720 ))
- Used `cargo hack` to check MSRV
([#​754](https://togithub.com/rust-itertools/itertools/issues/754 ))
###
[`v0.11.0`](https://togithub.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0110 )
[Compare
Source](https://togithub.com/rust-itertools/itertools/compare/v0.10.5...v0.11.0 )
##### Breaking
- Make `Itertools::merge_join_by` also accept functions returning bool
([#​704](https://togithub.com/rust-itertools/itertools/issues/704 ))
- Implement `PeekingNext` transitively over mutable references
([#​643](https://togithub.com/rust-itertools/itertools/issues/643 ))
- Change `with_position` to yield `(Position, Item)` instead of
`Position<Item>`
([#​699](https://togithub.com/rust-itertools/itertools/issues/699 ))
##### Added
- Add `Itertools::take_while_inclusive`
([#​616](https://togithub.com/rust-itertools/itertools/issues/616 ))
- Implement `PeekingNext` for `PeekingTakeWhile`
([#​644](https://togithub.com/rust-itertools/itertools/issues/644 ))
- Add `EitherOrBoth::{just_left, just_right, into_left, into_right,
as_deref, as_deref_mut, left_or_insert, right_or_insert,
left_or_insert_with, right_or_insert_with, insert_left, insert_right,
insert_both}`
([#​629](https://togithub.com/rust-itertools/itertools/issues/629 ))
- Implement `Clone` for `CircularTupleWindows`
([#​686](https://togithub.com/rust-itertools/itertools/issues/686 ))
- Implement `Clone` for `Chunks`
([#​683](https://togithub.com/rust-itertools/itertools/issues/683 ))
- Add `Itertools::process_results`
([#​680](https://togithub.com/rust-itertools/itertools/issues/680 ))
##### Changed
- Use `Cell` instead of `RefCell` in `Format` and `FormatWith`
([#​608](https://togithub.com/rust-itertools/itertools/issues/608 ))
- CI tweaks
([#​674](https://togithub.com/rust-itertools/itertools/issues/674 ),
[#​675](https://togithub.com/rust-itertools/itertools/issues/675 ))
- Document and test the difference between stable and unstable sorts
([#​653](https://togithub.com/rust-itertools/itertools/issues/653 ))
- Fix documentation error on `Itertools::max_set_by_key`
([#​692](https://togithub.com/rust-itertools/itertools/issues/692 ))
- Move MSRV metadata to `Cargo.toml`
([#​672](https://togithub.com/rust-itertools/itertools/issues/672 ))
- Implement `equal` with `Iterator::eq`
([#​591](https://togithub.com/rust-itertools/itertools/issues/591 ))
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-08-28 22:13:35 -07:00
Thorsten Ball
19d8422933
stories: Get OverflowScrollStory to scroll again ( #15982 )
...
This makes it at least scroll again, but it doesn't scroll down to the
last element yet. We haven't figured out why yet.
Release Notes:
- N/A
Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>
2024-08-09 12:32:26 +02:00
Antonio Scandurra
5df1481297
Introduce a new markdown
crate ( #11556 )
...
This pull request introduces a new `markdown` crate which is capable of
parsing and rendering a Markdown source. One of the key additions is
that it enables text selection within a `Markdown` view. Eventually,
this will replace `RichText` but for now the goal is to use it in the
assistant revamped assistant in the spirit of making progress.
<img width="711" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/b56c777b-e57c-42f9-95c1-3ada22f63a69 ">
Note that this pull request doesn't yet use the new markdown renderer in
`assistant2`. This is because we need to modify the assistant before
slotting in the new renderer and I wanted to merge this independently of
those changes.
Release Notes:
- N/A
---------
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Alp <akeles@umd.edu>
Co-authored-by: Zachiah Sawyer <zachiah@proton.me>
2024-05-09 11:03:33 +02:00
Marshall Bowers
f658af5903
Make border
methods always require an explicit width ( #11450 )
...
This PR makes the `border` methods require an explicit width instead of
defaulting to 1px.
This breaks convention with Tailwind, but it makes GPUI more consistent
with itself. We already have an edge case where the parameterized method
had to be named `border_width`, since `border` was taken up by an alias
for the 1px variant.
### Before
```rs
div()
.border()
.border_t()
.border_r()
.border_b()
.border_l()
.border_width(px(7.))
```
### After
```rs
div()
.border_1()
.border_t_1()
.border_r_1()
.border_b_1()
.border_l_1()
.border(px(7.))
```
Release Notes:
- N/A
2024-05-06 13:22:47 -04:00
Marshall Bowers
14cdafb0a8
Enable clippy::eq_op
( #9369 )
...
This PR enables the
[`clippy::eq_op`](https://rust-lang.github.io/rust-clippy/master/index.html#/eq_op )
rule and fixes the outstanding violations.
Enabling this rule seems to have caught two bugs!
Release Notes:
- N/A
2024-03-14 17:05:07 -04:00
Marshall Bowers
22fe03913c
Move Clippy configuration to the workspace level ( #8891 )
...
This PR moves the Clippy configuration up to the workspace level.
We're using the [`lints`
table](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table )
to configure the Clippy ruleset in the workspace's `Cargo.toml`.
Each crate in the workspace now has the following in their own
`Cargo.toml` to inherit the lints from the workspace:
```toml
[lints]
workspace = true
```
This allows for configuring rust-analyzer to show Clippy lints in the
editor by using the following configuration in your Zed `settings.json`:
```json
{
"lsp": {
"rust-analyzer": {
"initialization_options": {
"check": {
"command": "clippy"
}
}
}
}
```
Release Notes:
- N/A
2024-03-05 12:01:17 -05:00
Piotr Osiewicz
743f9b345f
chore: Move workspace dependencies to workspace.dependencies ( #7454 )
...
We should prefer referring to local deps via `.workspace = true` from
now on.
Release Notes:
- N/A
2024-02-06 20:41:36 +01:00
Marshall Bowers
e338f34097
Sort dependencies in Cargo.toml
files ( #7126 )
...
This PR sorts the dependency lists in our `Cargo.toml` files so that
they are in alphabetical order.
This should make them easier to visually scan when looking for a
dependency.
Apologies in advance for any merge conflicts 🙈
Release Notes:
- N/A
2024-01-30 21:41:29 -05:00
Marshall Bowers
0cb8b0e451
Clean up Cargo.toml
files ( #7044 )
...
This PR cleans up some inconsistencies in the `Cargo.toml` files that
were driving me crazy.
Release Notes:
- N/A
2024-01-29 23:47:20 -05:00
Piotr Osiewicz
0a0a866dd5
Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. ( #5535 )
...
Release Notes:
- N/A
2024-01-27 13:51:16 +01:00
Piotr Osiewicz
f2ff7fa4d5
chore: Change AGPL-licensed crates to GPL (except for collab) ( #4231 )
...
- [x] Fill in GPL license text.
- [x] live_kit_client depends on live_kit_server as non-dev dependency,
even though it seems to only be used for tests. Is that an issue?
Release Notes:
- N/A
2024-01-24 00:26:58 +01:00
Piotr Osiewicz
21e6b09361
Remove license-file from Cargo.toml as it is apparently redundant ( #4218 )
...
Release Notes:
- N/A
2024-01-23 17:40:30 +01:00
Piotr Osiewicz
678bdddd7d
chore: Add crate licenses. ( #4158 )
...
- GPUI and all dependencies: Apache 2
- Everything else: AGPL
Here's a script that I've generated for it:
https://gist.github.com/osiewicz/6afdd6626e517da24a2092807e6f0b6e
Release Notes:
- N/A
---------
Co-authored-by: David <david@zed.dev>
2024-01-23 16:56:22 +01:00
Mikayla
a44aae9e91
Finish documenting the action, asset, color, and element modules in GPUI
...
Remove SmallVec from the public API of GPUI
2024-01-20 20:15:23 -08:00
Marshall Bowers
decf320a74
Rename overflow_hidden_{x,y}
to overflow_{x,y}_hidden
( #4146 )
...
This PR renames the `overflow_hidden_x` and `overflow_hidden_y` methods
to `overflow_x_hidden` and `overflow_y_hidden`, respectively.
This provides consistency with our `overflow_x_scroll` /
`overflow_y_scroll` methods, as well as better matches Tailwind's
naming.
Release Notes:
- N/A
2024-01-18 22:10:41 -05:00
Marshall Bowers
90f4c70a82
Rename h_stack
and v_stack
to h_flex
and v_flex
, respectively ( #4053 )
...
This PR renames the `h_stack` and `v_stack` to `h_flex` and `v_flex`,
respectively.
We were previously using `h_stack` and `v_stack` to match SwiftUI, but
`h_flex` and `v_flex` fit better with the web/flexbox terminology that
the rest of GPUI uses.
Additionally, we were already calling the utility functions used to
implement `h_stack` and `v_stack` by the new names.
Release Notes:
- N/A
2024-01-15 11:34:06 -05:00
Max Brunsfeld
f5ba22659b
Remove 2 suffix from gpui
...
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:59:39 -08:00
Nathan Sobo
68e7d99219
Return impl IntoElement from RenderOnce::render
...
This makes it a bit more approachable to implement.
This required converting the state of Component to AnyElement, which
costs an allocation. I'm hoping this will be ok performance-wise now
that AnyElements use bump allocation, but I need to benchmark still.
2024-01-02 10:27:09 -07:00
Nathan Sobo
83923fd6d5
Clean up Element API and start on docs
2023-12-31 08:33:40 -07:00
Nate Butler
3cf003763e
Use updated story container in Text story
2023-12-14 17:38:22 -05:00
Nate Butler
63c3edfb83
Continue styling new story components
2023-12-14 16:52:05 -05:00
Nate Butler
c041799c6a
Extend Story components, allow linking to story file
...
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-14 15:55:17 -05:00
Marshall Bowers
1b05aad30c
Extract Story
into separate story
crate ( #3378 )
...
This PR extracts the `Story` component into a separate `story` crate so
that it can be shared among various crates that define stories.
Release Notes:
- N/A
---------
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2023-11-21 13:42:00 -05:00