509 Commits

Author SHA1 Message Date
Chayim Refael Friedman
32d50921d6 Remove Rust ungram file from the Ungrammar repo
It can be confused with the real Rust ungram, now that they're in the same repo.
2025-12-16 21:59:12 +02:00
David Faure
3be2b2aaa5 internal: fix gdb pretty printer when using Repr::Static
I missed a ["__0"] to access the str in the Static case.

Also, simplify the code to rely on the pretty printer for str
rather than accessing data_ptr/length directly. This makes it
more robust against changes in str.

Output before: "<SmolStr Static error: There is no member named data_ptr.>"
Output after: "preferred-width"
2025-11-30 10:35:07 +01:00
Laurențiu Nicola
ef944f193f Reformat python script 2025-11-24 13:07:39 +02:00
David Faure
0e24a86d36 Provide a gdb pretty printer for smol_str::SmolStr
Auto-loaded via the debugger_visualizer attribute.
Tested on smolstr's unittest:

$ RUSTFLAGS="-C debuginfo=2 -C opt-level=0" cargo test -p smol_str --no-run
$ rust-gdb target/debug/deps/test-a806b111557a7133
(gdb) break test::conversions
(gdb) run
(gdb) next
(gdb) print s
(and other locations in that file, to test the three cases: Inline,
Static and Heap)
2025-11-23 14:49:23 +01:00
Chayim Refael Friedman
813c7d43db
Merge pull request #21017 from alexheretic/faster-inline-clones
Optimise `SmolStr::clone` 4-5x speedup inline, 0.5x heap (slow down)
2025-11-23 10:57:38 +00:00
Laurențiu Nicola
f0ecddb3fc Fix elided lifetime 2025-11-18 14:06:52 +02:00
Alex Butler
d52491b520 smol_str: Optimise inline SmolStr::clone 2025-11-18 11:41:54 +00:00
Laurențiu Nicola
c9a7c9c66b Drop unused ungrammar import 2025-11-18 13:12:03 +02:00
Chayim Refael Friedman
c8265198ef Merge pull request #21021 from A4-Tacks/lib-smol_str-doc-feature
Fix removed feature `doc_auto_cfg` for smol_str lib
2025-11-15 09:17:33 +02:00
Lukas Wirth
1b62ceb886 Merge pull request #21002 from Veykril/veykril/push-nztxvpnntmrx
lib: Bump editions to 2024 and remove legacy files
2025-11-15 09:17:16 +02:00
Lukas Wirth
51e915cff1 Reformat 2025-11-15 09:16:57 +02:00
Lukas Wirth
ee3c21fb61 Reformat 2025-11-15 09:16:57 +02:00
Lukas Wirth
ae4b7f6c8f Reformat 2025-11-15 09:16:57 +02:00
Lukas Wirth
9295f8eaf6 Update Cargo.toml and lockfile 2025-11-15 09:16:57 +02:00
Laurențiu Nicola
13cfdb81f6 Merge remote-tracking branch 'smol_str/master' into rebuild-master-again 2025-11-15 09:16:33 +02:00
Laurențiu Nicola
c823b06051 Merge remote-tracking branch 'text-size/master' into rebuild-master-again 2025-11-15 09:16:33 +02:00
Laurențiu Nicola
54680be4dd Merge remote-tracking branch 'ungrammar/master' into rebuild-master-again 2025-11-15 09:16:31 +02:00
Alona Enraght-Moony
397b7bc9b9 implement Clone for Rule 2025-11-11 16:48:08 +02:00
Lukas Wirth
2fcccbbe29 Publish 0.3.4 2025-10-23 17:10:05 +02:00
Lukas Wirth
1af327e78a Publish 0.3.3 2025-10-23 13:15:25 +02:00
Alex Butler
b1acd45fce Update changelog 2025-10-22 14:29:46 +01:00
Alex Butler
6ca3f3812a Mark replacen_1_ascii as unsafe 2025-10-22 14:29:46 +01:00
Alex Butler
25cb3f6c56 Optimise replacen 1-ascii when count >= len 2025-10-22 14:29:46 +01:00
Alex Butler
a2b3d25dbf Optimise replacen_smolstr for single ascii replace 2025-10-22 14:29:46 +01:00
Alex Butler
b4ce6529fa Add test from_buf_and_chars_size_hinted_heap & fix 2025-10-22 14:25:23 +01:00
Alex Butler
c9cd0324a7 Update changelog 2025-10-22 14:25:23 +01:00
Alex Butler
bc69b02574 Optimise to_{lower,upper}case_smolstr 2025-10-22 14:25:23 +01:00
Alex Butler
eabb248294 CI: Add TEST_BENCHES 2025-10-22 09:41:47 +02:00
Alex Butler
2cb99fb418 Only bench smol_str stuff 2025-10-22 09:41:47 +02:00
Alex Butler
09ecb46094 Add SmolStr vs String benchmarks 2025-10-22 09:41:47 +02:00
Alex Butler
f8612bc596 Update changelog 2025-09-22 21:07:17 +02:00
Alex Butler
a267e0905e Optimise to_ascii_{upper,lower}case_smolstr 2025-09-22 21:07:17 +02:00
james7132
4cdc1b1544 Use serde_core over serde 2025-09-22 10:40:39 +02:00
Alex Butler
3e6863eeb1 Fix lints 2025-09-14 12:34:12 +01:00
Lukas Wirth
529d3b935d
Merge pull request #20393 from rust-lang/veykril/push-urpzrkwpkmxw
Fix non-lsp compliant `Response` definition
2025-08-06 16:12:58 +00:00
Lukas Wirth
fc9a89dd19 Fix non-lsp compliant Response definition 2025-08-06 18:01:44 +02:00
Lukas Wirth
ae8b69f33a Report the incorrect payload when failing to deserialize lsp messages 2025-08-06 17:30:18 +02:00
Shashi Shankar
4541495037 examples: add minimal_lsp.rs and FIFO test script.
* `examples/minimal_lsp.rs` – compact LSP server showing definition,
  completion, hover, rustfmt-based formatting, and dummy diagnostics.
  Advertises UTF-8 offset encoding.

* `examples/manual_test.sh` – FIFO script that streams the canonical
  nine LSP packets so anyone can validate the server from two terminals.

No new runtime deps; `anyhow` stays under [dev-dependencies].
2025-07-17 11:04:14 +02:00
Lukas Wirth
23712aea06 cargo upgrade 2025-06-13 10:08:20 +02:00
Lukas Wirth
1e1571e1c8 fix: Fix new nightly lints 2025-03-31 13:27:54 +02:00
Lukas Wirth
500ea05aef chore: Bump dependencies 2025-03-23 08:46:10 +01:00
BenjaminBrienen
7535bb4661 cargo fmt 2025-03-15 21:32:01 +01:00
BenjaminBrienen
70fc7b98c6 edition = "2024" 2025-03-15 21:32:01 +01:00
BenjaminBrienen
e70a9c5b9e rust-version = "1.85" 2025-03-15 21:32:01 +01:00
Eric Huss
22fff683c4 Update stdarch 2025-03-06 11:11:55 -08:00
Havard Eidnes
f4842d5803 line-index: don't try to use neon on big-endian aarch64. 2025-02-04 15:22:49 +00:00
Laurențiu Nicola
788acba2dd Rephrase comment 2025-01-23 13:52:39 +02:00
Piotr Osiewicz
b57157ea94 lsp-server: Drop outgoing messages on background thread
Closes #18961
2025-01-18 17:47:27 +01:00
Lukas Wirth
5211972743 internal: Split serde derive feature into serde_derive usage
Ideally we'd not have any dependency pull in the derive feature for faster build times, once that is the case this change would have an actual effect.
See https://github.com/matklad/macro-dep-test/blob/master/README.md for context.
2024-12-20 11:55:02 +01:00
Lukas Wirth
076e315d60 Publish 0.3.2 2024-10-23 22:56:02 +02:00