Skip to main content

max / quasi

Catch a Locating that answers handle and label under one name showing() took any name, including under's. Handle and label each go on under their own key, so naming both the same interleaves them and get_all(under) yields handle, label, handle, label. A route then reads every second value as a path. One pick hid it, because get(under) still returned the handle. Batching does not, and get_all is the documented reader now. A debug_assert says so where the name is set, rather than leaving it to look like a picker that answered twice. Outcome::File also said "Tauri opens a save dialog" with nothing pointing at Sought::Save, which is the sentence that caused the original confusion about which member asks for a destination. It now names the difference.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-26 01:54 UTC
Signed with PGP, not checked
Commit: c6a0b6e27d26f9a7f993d0279fecfed4b3ffdff3
Parent: 3ae610c
1 file changed, +23 insertions, -1 deletion
@@ -271,6 +271,13 @@
271 271 /// save dialog, a browser downloads, a terminal writes to the working
272 272 /// directory. One description, the same reading on every host.
273 273 ///
274 + /// Not the way to ask the reader to NAME a file. This member has the file
275 + /// already and is handing it over; a route that wants a destination first,
276 + /// with a suggestion in the dialog, asks for
277 + /// [`Sought::Save`](Sought::Save) through [`Locate`](Self::Locate). The
278 + /// save dialog named above is how a host performs this one, not a way to
279 + /// choose where it lands.
280 + ///
274 281 /// # Why the destination is not in the request
275 282 ///
276 283 /// It is the exact mirror of the upload ruling (`108557ec`, 2026-08-18):
@@ -585,9 +592,24 @@
585 592 /// [`Field::upload`](crate::Field::upload)'s converse reason: a missing
586 593 /// accept list is a real choice and has to be argued, and a route with
587 594 /// nothing to show a label on is the common case.
595 + ///
596 + /// # It must differ from [`under`](Self::under)
597 + ///
598 + /// Handle and label go on under their own names, so giving both the same
599 + /// name interleaves them: `get_all(under)` then yields handle, label,
600 + /// handle, label and the route reads every second value as a path. One
601 + /// pick used to hide this, because `get(under)` still returned the handle;
602 + /// batching does not, and `get_all` is the documented reader now. Caught
603 + /// here in debug rather than left to look like a picker that answers twice.
588 604 #[must_use]
589 605 pub fn showing(mut self, labelled: impl Into<String>) -> Self {
590 - self.labelled = Some(labelled.into());
606 + let labelled = labelled.into();
607 + debug_assert_ne!(
608 + labelled, self.under,
609 + "a Locating's label name and handle name must differ, or one ask answers both under \
610 + the same key and every second value reads as a handle",
611 + );
612 + self.labelled = Some(labelled);
591 613 self
592 614 }
593 615