fix: add --all to cargo fmt in script/test and autoformat codebase
cargo fmt without --all fails with "Failed to find targets" in workspace repos. This was blocking every story's gates. Also ran cargo fmt --all to fix all existing formatting issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -79,7 +79,10 @@ impl SettingsApi {
|
||||
payload: Json<EditorCommandPayload>,
|
||||
) -> OpenApiResult<Json<EditorCommandResponse>> {
|
||||
let editor_command = payload.0.editor_command;
|
||||
let trimmed = editor_command.as_deref().map(str::trim).filter(|s| !s.is_empty());
|
||||
let trimmed = editor_command
|
||||
.as_deref()
|
||||
.map(str::trim)
|
||||
.filter(|s| !s.is_empty());
|
||||
match trimmed {
|
||||
Some(cmd) => {
|
||||
self.ctx.store.set(EDITOR_COMMAND_KEY, json!(cmd));
|
||||
@@ -256,9 +259,7 @@ mod tests {
|
||||
async fn get_editor_http_handler_returns_null_when_not_set() {
|
||||
let dir = TempDir::new().unwrap();
|
||||
let ctx = test_ctx(dir.path());
|
||||
let api = SettingsApi {
|
||||
ctx: Arc::new(ctx),
|
||||
};
|
||||
let api = SettingsApi { ctx: Arc::new(ctx) };
|
||||
let result = api.get_editor().await.unwrap().0;
|
||||
assert!(result.editor_command.is_none());
|
||||
}
|
||||
@@ -267,9 +268,7 @@ mod tests {
|
||||
async fn set_editor_http_handler_stores_value() {
|
||||
let dir = TempDir::new().unwrap();
|
||||
let ctx = test_ctx(dir.path());
|
||||
let api = SettingsApi {
|
||||
ctx: Arc::new(ctx),
|
||||
};
|
||||
let api = SettingsApi { ctx: Arc::new(ctx) };
|
||||
let result = api
|
||||
.set_editor(Json(EditorCommandPayload {
|
||||
editor_command: Some("zed".to_string()),
|
||||
@@ -284,9 +283,7 @@ mod tests {
|
||||
async fn set_editor_http_handler_clears_value_when_null() {
|
||||
let dir = TempDir::new().unwrap();
|
||||
let ctx = test_ctx(dir.path());
|
||||
let api = SettingsApi {
|
||||
ctx: Arc::new(ctx),
|
||||
};
|
||||
let api = SettingsApi { ctx: Arc::new(ctx) };
|
||||
// First set a value
|
||||
api.set_editor(Json(EditorCommandPayload {
|
||||
editor_command: Some("code".to_string()),
|
||||
|
||||
Reference in New Issue
Block a user