File: 2002_avoid_nightly_syntax.patch

package info (click to toggle)
rust-smtp-proto 0.2.0%2B20250914-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 416 kB
  • sloc: makefile: 2; sh: 1
file content (28 lines) | stat: -rw-r--r-- 1,034 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: avoid code syntax too fancy for rustc older than 1.88
Author: Jonas Smedegaard <dr@jones.dk>
Bug: https://github.com/stalwartlabs/smtp-proto/issues/11
Last-Update: 2025-09-14
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/request/parser.rs
+++ b/src/request/parser.rs
@@ -122,8 +122,8 @@
                 })
             }
             AUTH => {
-                if parser.stop_char != LF
-                    && let Some(mechanism) = parser.mechanism()?
+                if parser.stop_char != LF {
+                    if let Some(mechanism) = parser.mechanism()?
                 {
                     let initial_response = if parser.stop_char != LF {
                         parser.text()?
@@ -135,7 +135,7 @@
                         mechanism,
                         initial_response,
                     });
-                }
+                }}
                 Err(Error::SyntaxError {
                     syntax: "AUTH mechanism [initial-response]",
                 })