3 Commits

Author SHA1 Message Date
Luke Valenta
fba130e663
refactor: Clean up worker-sandbox (#763)
* Clean up worker-sandbox

- Remove unexpected fields from wrangler.toml (type, miniflare, package)
- Address or add allow rules for clippy::pedantic lints
- Add macros to avoid duplicate route configurations
- Move files from src/test/* to src/ and add test handlers and routes to
  make it possible to run the tests from the sandbox worker
- Move several handlers out of alarm.rs and into more suitable files
  (e.g., counter.rs where the corresponding Durable Objects live). Note
  that the SHARED_COUNTER Durable Object class is still not yet defined.
- Fix and add test handler for handle_basic_test, which passes
  except for the transactional storage API tests

* Address review comments

- Clean up additional clippy lints rather than add exceptions
- Describe how to get tests to pass even with dwarf-debug-info enabled

* Fix new clippy complaints
2025-07-07 15:28:41 -07:00
Kevin Flansburg
36b646cd62
Allow returning any error that implements std::error::Error (#527)
* IntoResponse and FromRequest return Result

* Generic error return types

* Fix example
2024-04-28 18:37:50 -04:00
David Komer
0a94def73f
WorkerRequest/WorkerResponse traits (#530)
* http traits

* WorkerRequest
* WorkerResponse

* delete comment block

* consolidate macro

* FromRequest / IntoResponse

* and a bit of cleanup to clarify previous naming conflict of WorkerResponse

* more generic IntoResponse impl
2024-04-28 09:25:06 -04:00