chiark / gitweb /
otter.git
2 years agoCargo.toml: Update all versions to 1.0.0 otter-1.0.0
Ian Jackson [Sat, 2 Apr 2022 14:15:25 +0000 (15:15 +0100)]
Cargo.toml: Update all versions to 1.0.0

Commit made automatically by update-versions.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: Document that this is version 1.0.0
Ian Jackson [Sat, 2 Apr 2022 13:01:12 +0000 (14:01 +0100)]
changelog: Document that this is version 1.0.0

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: Document changes since 0.7.3
Ian Jackson [Sat, 2 Apr 2022 12:23:35 +0000 (13:23 +0100)]
changelog: Document changes since 0.7.3

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodaemon: Move src_service into services! call
Ian Jackson [Sat, 2 Apr 2022 14:11:04 +0000 (15:11 +0100)]
daemon: Move src_service into services! call

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoinventory: Postpone this TODO
Ian Jackson [Sat, 2 Apr 2022 14:12:51 +0000 (15:12 +0100)]
inventory: Postpone this TODO

So far things still seem to be working, despite upstream rust problems
with #[used].

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoDocument new build disk space requirement - reduced !
Ian Jackson [Sat, 2 Apr 2022 13:11:39 +0000 (14:11 +0100)]
Document new build disk space requirement - reduced !

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodaemon: Reorder routes in order of likely frequency
Ian Jackson [Sat, 2 Apr 2022 14:09:01 +0000 (15:09 +0100)]
daemon: Reorder routes in order of likely frequency

I'm not sure if this is at all relevant but it seems sensible
and is at worst harmless.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoactix: Revamp /_/{resource} handling
Ian Jackson [Sat, 2 Apr 2022 12:56:25 +0000 (13:56 +0100)]
actix: Revamp /_/{resource} handling

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agorelease checklist: Drop entry about nightly
Ian Jackson [Sat, 2 Apr 2022 12:22:14 +0000 (13:22 +0100)]
release checklist: Drop entry about nightly

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoFormulaic doc comments for other crates
Ian Jackson [Sat, 2 Apr 2022 11:55:11 +0000 (12:55 +0100)]
Formulaic doc comments for other crates

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoBespoke doc comments for otter, otter-cli and otter-daemon
Ian Jackson [Sat, 2 Apr 2022 11:54:37 +0000 (12:54 +0100)]
Bespoke doc comments for otter, otter-cli and otter-daemon

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoDrop unused dependency: failure
Ian Jackson [Sat, 2 Apr 2022 10:38:56 +0000 (11:38 +0100)]
Drop unused dependency: failure

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agocargo: Update zip (zipfile) dependency
Ian Jackson [Fri, 1 Apr 2022 22:44:12 +0000 (23:44 +0100)]
cargo: Update zip (zipfile) dependency

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoCargo update
Ian Jackson [Fri, 1 Apr 2022 22:41:41 +0000 (23:41 +0100)]
Cargo update

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoMakefile: Build wasm-bindgen with selected rust version too
Ian Jackson [Fri, 1 Apr 2022 22:33:19 +0000 (23:33 +0100)]
Makefile: Build wasm-bindgen with selected rust version too

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoDeploy release build
Ian Jackson [Fri, 1 Apr 2022 22:08:43 +0000 (23:08 +0100)]
Deploy release build

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoTurn on integer overflow checks for release builds
Ian Jackson [Fri, 1 Apr 2022 22:08:17 +0000 (23:08 +0100)]
Turn on integer overflow checks for release builds

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoactix: Fix CORS
Ian Jackson [Fri, 1 Apr 2022 21:57:21 +0000 (22:57 +0100)]
actix: Fix CORS

The docs aren't entirely clear but suggest that the default allowed
origins is All.  But dbg! output seems to contradict this.  And we
should support more headers, and say that we don't vary our CORS at
all.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoDocs update: Not beta, works on stable
Ian Jackson [Fri, 1 Apr 2022 21:33:03 +0000 (22:33 +0100)]
Docs update: Not beta, works on stable

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoMakefile: Arrangements for honouring RUST_VERSION
Ian Jackson [Fri, 1 Apr 2022 21:32:34 +0000 (22:32 +0100)]
Makefile: Arrangements for honouring RUST_VERSION

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoUpdate TODOs
Ian Jackson [Thu, 31 Mar 2022 20:05:37 +0000 (21:05 +0100)]
Update TODOs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Thu, 31 Mar 2022 20:05:08 +0000 (21:05 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes, and allow lints
Ian Jackson [Thu, 31 Mar 2022 20:00:21 +0000 (21:00 +0100)]
clippy: Miscellaneous minor changes, and allow lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Thu, 31 Mar 2022 19:58:16 +0000 (20:58 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes, and allow lints
Ian Jackson [Thu, 31 Mar 2022 19:56:12 +0000 (20:56 +0100)]
clippy: Miscellaneous minor changes, and allow lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Thu, 31 Mar 2022 19:44:50 +0000 (20:44 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoapitest: Fix a write() call that should be write_all()
Ian Jackson [Thu, 31 Mar 2022 19:39:56 +0000 (20:39 +0100)]
apitest: Fix a write() call that should be write_all()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes, and allow lints
Ian Jackson [Thu, 31 Mar 2022 19:39:47 +0000 (20:39 +0100)]
clippy: Miscellaneous minor changes, and allow lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoUpdate TODOs
Ian Jackson [Thu, 31 Mar 2022 19:39:07 +0000 (20:39 +0100)]
Update TODOs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoUse Educe to impl Default on a couple of types in clisupport
Ian Jackson [Thu, 31 Mar 2022 19:31:27 +0000 (20:31 +0100)]
Use Educe to impl Default on a couple of types in clisupport

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes, and allow lints
Ian Jackson [Thu, 31 Mar 2022 19:25:30 +0000 (20:25 +0100)]
clippy: Miscellaneous minor changes, and allow lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes, and allow lints
Ian Jackson [Thu, 31 Mar 2022 19:17:01 +0000 (20:17 +0100)]
clippy: Miscellaneous minor changes, and allow lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes, and allow lints
Ian Jackson [Thu, 31 Mar 2022 19:12:40 +0000 (20:12 +0100)]
clippy: Miscellaneous minor changes, and allow lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoparse_slice_hex: Fix to properly handle odd-length slices
Ian Jackson [Thu, 31 Mar 2022 19:09:35 +0000 (20:09 +0100)]
parse_slice_hex: Fix to properly handle odd-length slices

Previously it would accept some of them, and parse them in a weird
way.  I don't think this is actually important.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Thu, 31 Mar 2022 19:09:22 +0000 (20:09 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Thu, 31 Mar 2022 02:14:19 +0000 (03:14 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoPlayerUpdates: Rename update log starting functions and types
Ian Jackson [Thu, 31 Mar 2022 02:11:09 +0000 (03:11 +0100)]
PlayerUpdates: Rename update log starting functions and types

Prompted by clippy complaining about the old weird new() function.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes, and allow lints
Ian Jackson [Thu, 31 Mar 2022 02:00:56 +0000 (03:00 +0100)]
clippy: Miscellaneous minor changes, and allow lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotermprogress: Rename reporter() functions returning Box<dyn>
Ian Jackson [Thu, 31 Mar 2022 01:56:46 +0000 (02:56 +0100)]
termprogress: Rename reporter() functions returning Box<dyn>

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Thu, 31 Mar 2022 01:52:58 +0000 (02:52 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes, and allow lints
Ian Jackson [Thu, 31 Mar 2022 01:50:40 +0000 (02:50 +0100)]
clippy: Miscellaneous minor changes, and allow lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes, and allow lints
Ian Jackson [Thu, 31 Mar 2022 01:46:07 +0000 (02:46 +0100)]
clippy: Miscellaneous minor changes, and allow lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agopacketframe: Fix a write() call that should be write_all()
Ian Jackson [Thu, 31 Mar 2022 01:44:19 +0000 (02:44 +0100)]
packetframe: Fix a write() call that should be write_all()

I think this was probably a bug.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Thu, 31 Mar 2022 01:43:49 +0000 (02:43 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Thu, 31 Mar 2022 01:31:04 +0000 (02:31 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Suppress a buggy lint
Ian Jackson [Thu, 31 Mar 2022 01:25:56 +0000 (02:25 +0100)]
clippy: Suppress a buggy lint

This fires on process_all_players_for_account, but the collect
*is* needed and the suggestion doesn't compile.

I wasn't able to make a minimal repro, but there is what looks like a
report of the same thing (and many other issues with this lint).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Thu, 31 Mar 2022 01:17:03 +0000 (02:17 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoRawToken: Replace constructor with a From impl
Ian Jackson [Thu, 31 Mar 2022 00:34:37 +0000 (01:34 +0100)]
RawToken: Replace constructor with a From impl

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Thu, 31 Mar 2022 00:34:27 +0000 (01:34 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Thu, 31 Mar 2022 00:27:10 +0000 (01:27 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Prefer .len() > 0 to ! .is_empty()
Ian Jackson [Thu, 31 Mar 2022 00:21:33 +0000 (01:21 +0100)]
clippy: Prefer .len() > 0 to ! .is_empty()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes, and allow lints
Ian Jackson [Thu, 31 Mar 2022 00:21:24 +0000 (01:21 +0100)]
clippy: Miscellaneous minor changes, and allow lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes, and allow lints
Ian Jackson [Thu, 31 Mar 2022 00:18:22 +0000 (01:18 +0100)]
clippy: Miscellaneous minor changes, and allow lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoInstanceBundles: impl Default and use that for new()
Ian Jackson [Thu, 31 Mar 2022 00:13:22 +0000 (01:13 +0100)]
InstanceBundles: impl Default and use that for new()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes, and allow lints
Ian Jackson [Thu, 31 Mar 2022 00:13:16 +0000 (01:13 +0100)]
clippy: Miscellaneous minor changes, and allow lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoasseturl: Fix a wrong call to write, to be write_all
Ian Jackson [Thu, 31 Mar 2022 00:10:19 +0000 (01:10 +0100)]
asseturl: Fix a wrong call to write, to be write_all

In practice this bug is latent, buecause DigestWrite will take the
whole thing.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes, and allow lints
Ian Jackson [Thu, 31 Mar 2022 00:06:54 +0000 (01:06 +0100)]
clippy: Miscellaneous minor changes, and allow lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Thu, 31 Mar 2022 00:03:04 +0000 (01:03 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agozcoord: Move from_str impl for Mutable to be FromStr impl
Ian Jackson [Wed, 30 Mar 2022 23:57:24 +0000 (00:57 +0100)]
zcoord: Move from_str impl for Mutable to be FromStr impl

Suggested by clippy.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agozcoord: Move from_str impl to be (only) in FromStr impl
Ian Jackson [Wed, 30 Mar 2022 23:55:41 +0000 (00:55 +0100)]
zcoord: Move from_str impl to be (only) in FromStr impl

Suggested by clippy.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agozcoord: Remove redundant to_string method
Ian Jackson [Wed, 30 Mar 2022 23:54:35 +0000 (00:54 +0100)]
zcoord: Remove redundant to_string method

This is the same as the Display impl.  Suggested by clippy.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: allow some lints
Ian Jackson [Wed, 30 Mar 2022 23:53:47 +0000 (00:53 +0100)]
clippy: allow some lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Wed, 30 Mar 2022 23:53:40 +0000 (00:53 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: Miscellaneous minor changes
Ian Jackson [Wed, 30 Mar 2022 23:38:13 +0000 (00:38 +0100)]
clippy: Miscellaneous minor changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoHtml type: impl Default and derive new()
Ian Jackson [Wed, 30 Mar 2022 23:36:09 +0000 (00:36 +0100)]
Html type: impl Default and derive new()

Default suggested by clippy.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoMakefile: Support for controlling the Rust version
Ian Jackson [Wed, 30 Mar 2022 23:35:32 +0000 (00:35 +0100)]
Makefile: Support for controlling the Rust version

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: allow some lints
Ian Jackson [Wed, 30 Mar 2022 23:28:37 +0000 (00:28 +0100)]
clippy: allow some lints

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoclippy: wip machinery, and transfer the one allowed lint so far
Ian Jackson [Wed, 30 Mar 2022 23:26:41 +0000 (00:26 +0100)]
clippy: wip machinery, and transfer the one allowed lint so far

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoactix: Drop a leftover dbg
Ian Jackson [Wed, 30 Mar 2022 22:58:15 +0000 (23:58 +0100)]
actix: Drop a leftover dbg

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoDrop remaining feature enablements.
Ian Jackson [Wed, 30 Mar 2022 22:55:57 +0000 (23:55 +0100)]
Drop remaining feature enablements.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoRemove one use of TAIT
Ian Jackson [Wed, 30 Mar 2022 22:55:41 +0000 (23:55 +0100)]
Remove one use of TAIT

This is our remaining usntable feature.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoDrop IteratorExt extension trait
Ian Jackson [Wed, 30 Mar 2022 22:54:36 +0000 (23:54 +0100)]
Drop IteratorExt extension trait

We used this once.  Not a successful experiment I think.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoactix: Document the situation with HEAD etc.
Ian Jackson [Wed, 30 Mar 2022 22:43:02 +0000 (23:43 +0100)]
actix: Document the situation with HEAD etc.

This is not very good really, but I guess it will do for now.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodaemon: Remove a stray commented-out import thing.
Ian Jackson [Wed, 30 Mar 2022 22:22:07 +0000 (23:22 +0100)]
daemon: Remove a stray commented-out import thing.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoactix Files: Work around content-type breakage
Ian Jackson [Wed, 30 Mar 2022 21:26:30 +0000 (22:26 +0100)]
actix Files: Work around content-type breakage

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoactix Files: Do our content-type mangling first
Ian Jackson [Wed, 30 Mar 2022 21:45:23 +0000 (22:45 +0100)]
actix Files: Do our content-type mangling first

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoactix Files: Break out FILES_PATH
Ian Jackson [Wed, 30 Mar 2022 20:59:25 +0000 (21:59 +0100)]
actix Files: Break out FILES_PATH

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoactix Files: change error handling for middleware fixup fn
Ian Jackson [Wed, 30 Mar 2022 20:57:52 +0000 (21:57 +0100)]
actix Files: change error handling for middleware fixup fn

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoactix files content-type fixup: wip, call fn middlware
Ian Jackson [Wed, 30 Mar 2022 20:39:11 +0000 (21:39 +0100)]
actix files content-type fixup: wip, call fn middlware

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodaemon: Fix whitespace error
Ian Jackson [Wed, 30 Mar 2022 19:46:54 +0000 (20:46 +0100)]
daemon: Fix whitespace error

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoAbolish JsonLen and json_len
Ian Jackson [Tue, 29 Mar 2022 23:52:06 +0000 (00:52 +0100)]
Abolish JsonLen and json_len

This was for SSE buffer management, but we don't need it now.
And it was quite fiddly!

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoSSE: Adjust error handling somewhat
Ian Jackson [Tue, 29 Mar 2022 23:46:41 +0000 (00:46 +0100)]
SSE: Adjust error handling somewhat

Have UpdateReader::read throw a bespoke error.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoSSE: Redo buffer handling
Ian Jackson [Tue, 29 Mar 2022 20:45:29 +0000 (21:45 +0100)]
SSE: Redo buffer handling

Now we just write into a Vec.  This is rather simpler.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoRefine a TODO
Ian Jackson [Mon, 28 Mar 2022 01:40:10 +0000 (02:40 +0100)]
Refine a TODO

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoserver: Support explicit specification of addresses to listen on
Ian Jackson [Mon, 28 Mar 2022 01:19:09 +0000 (02:19 +0100)]
server: Support explicit specification of addresses to listen on

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoserver: Move listening address config resolution to config
Ian Jackson [Mon, 28 Mar 2022 01:08:22 +0000 (02:08 +0100)]
server: Move listening address config resolution to config

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoserver: Listen on localhost only by default, regardless of debug
Ian Jackson [Mon, 28 Mar 2022 01:04:07 +0000 (02:04 +0100)]
server: Listen on localhost only by default, regardless of debug

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoserver: Listen on port 8000 by default, regardless of debug
Ian Jackson [Mon, 28 Mar 2022 01:01:53 +0000 (02:01 +0100)]
server: Listen on port 8000 by default, regardless of debug

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoNote a TODO
Ian Jackson [Mon, 28 Mar 2022 01:09:19 +0000 (02:09 +0100)]
Note a TODO

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoactix routing: Use a conventional prefix for route "function" names
Ian Jackson [Mon, 28 Mar 2022 01:00:22 +0000 (02:00 +0100)]
actix routing: Use a conventional prefix for route "function" names

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoresource leaf routing: Document why we're leaving it order-sensitive
Ian Jackson [Mon, 28 Mar 2022 00:56:06 +0000 (01:56 +0100)]
resource leaf routing: Document why we're leaving it order-sensitive

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoRevert "resource leaf routing: Attempt via impl FromRequest"
Ian Jackson [Mon, 28 Mar 2022 00:52:11 +0000 (01:52 +0100)]
Revert "resource leaf routing: Attempt via impl FromRequest"

This reverts commit 383fab0156489a705901ba06580c60215dc313c6.

2 years agoresource leaf routing: Attempt via impl FromRequest
Ian Jackson [Mon, 28 Mar 2022 00:40:58 +0000 (01:40 +0100)]
resource leaf routing: Attempt via impl FromRequest

I wrote this thinking that implementing FromRequest, so that we can
return Status::NOT_FOUND would work to pass on to the next route.
But, no.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoTidying: Simplify a unit error struct
Ian Jackson [Mon, 28 Mar 2022 00:41:47 +0000 (01:41 +0100)]
Tidying: Simplify a unit error struct

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoactix cleanup: import futures::future
Ian Jackson [Mon, 28 Mar 2022 00:36:56 +0000 (01:36 +0100)]
actix cleanup: import futures::future

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoactix cleanup: Minor reformattint
Ian Jackson [Mon, 28 Mar 2022 00:36:20 +0000 (01:36 +0100)]
actix cleanup: Minor reformattint

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoCargo.nail: Drop our own directory
Ian Jackson [Mon, 28 Mar 2022 00:11:38 +0000 (01:11 +0100)]
Cargo.nail: Drop our own directory

We aren't nailing anything right now.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoweb templates: Use stem for template names (without .tera extension)
Ian Jackson [Mon, 28 Mar 2022 00:12:17 +0000 (01:12 +0100)]
web templates: Use stem for template names (without .tera extension)

This moves a bit of code to startup, and makes the macro use a bit
cleaner again.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoweb templates: Provide our own directory scanner
Ian Jackson [Mon, 28 Mar 2022 00:07:37 +0000 (01:07 +0100)]
web templates: Provide our own directory scanner

We don't know exactly what Tera::new() does, but in any case we want
to do something it doesn't support: have template names which do not
contain the .tera file extension.

No functional change in this commit.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoRocket cleanup: Call our tera tera
Ian Jackson [Sun, 27 Mar 2022 22:54:10 +0000 (23:54 +0100)]
Rocket cleanup: Call our tera tera

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>