Skip to content

Commit 3b9afc0

Browse files
committed
CHANGE: remove found? mezzanine
related to: Oldes/Rebol-issues#2053
1 parent 4221114 commit 3b9afc0

8 files changed

+21
-20
lines changed

src/mezz/mezz-series.reb

+8-7
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ offset?: func [
2626
subtract index? series2 index? series1
2727
]
2828

29-
found?: func [
30-
"Returns TRUE if value is not NONE."
31-
value
32-
][
33-
not none? :value
34-
]
29+
;@@ https://github.com/Oldes/Rebol-issues/issues/2053
30+
;found?: func [
31+
; "Returns TRUE if value is not NONE."
32+
; value
33+
;][
34+
; not none? :value
35+
;]
3536

3637
last?: single?: func [
3738
"Returns TRUE if the series length is 1."
@@ -374,7 +375,7 @@ alter: func [
374375
append series :value true
375376
]
376377
]
377-
found? unless remove (
378+
to logic! unless remove (
378379
either case [find/case series :value] [find series :value]
379380
) [append series :value]
380381
]

src/mezz/prot-http.reb

+1-1
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ sys/make-scheme [
766766
open?: func [
767767
port [port!]
768768
][
769-
found? all [object? port/state open? port/state/connection]
769+
all [object? port/state open? port/state/connection true]
770770
]
771771
close: func [
772772
port [port!]

src/mezz/prot-mysql.reb

+1-1
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ mysql-driver: make object! [
998998
]
999999
blob-to-text: [blob text tinyblob tinytext mediumblob mediumtext longblob longtext]
10001000
unless none? text-type: select blob-to-text col/type [
1001-
unless found? find col/flags 'binary [
1001+
unless find col/flags 'binary [
10021002
col/type: text-type
10031003
]
10041004
]

src/mezz/prot-tls.reb

+2-2
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ TLS-init-cipher-suite: func [
399399
(
400400
ctx/key-method: to word! key-method
401401
ctx/crypt-method: to word! cipher
402-
ctx/is-aead?: found? find [AES_128_GCM AES_256_GCM CHACHA20_POLY1305] ctx/crypt-method
402+
ctx/is-aead?: to logic! find [AES_128_GCM AES_256_GCM CHACHA20_POLY1305] ctx/crypt-method
403403

404404
log-more [
405405
"Key:^[[1m" ctx/key-method
@@ -1871,7 +1871,7 @@ sys/make-scheme [
18711871
port
18721872
]
18731873
open?: func [port [port!]][
1874-
found? all [port/state open? port/state/connection]
1874+
all [port/state open? port/state/connection true]
18751875
]
18761876
close: func [port [port!] /local ctx check1 check2][
18771877
log-more "CLOSE"

src/tests/units/bincode-test.r3

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ is-protected-error?: func[code][
370370

371371
--test-- "BinCode - FLOAT16, FLOAT, DOUBLE (write/read NAN)"
372372
b: binary/write #{} [float16 1.#NaN float 1.#NaN double 1.#NaN]
373-
--assert found? find [
373+
--assert not none? find [
374374
#{007E0000C07F000000000000F87F}
375375
#{007E0000C0FF000000000000F8FF} ; when used clang compiler (should it be normalized?)
376376
] b/buffer

src/tests/units/datatype-test.r3

+6-6
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ Rebol [
2424

2525
--test-- "find datatype!"
2626
;@@ https://github.com/Oldes/Rebol-issues/issues/256
27-
--assert found? find [#[datatype! string!] #[datatype! binary!]] #[datatype! binary!]
28-
--assert found? find reduce [string! binary!] binary!
29-
--assert found? find [#[datatype! string!] #[datatype! binary!]] #[datatype! binary!]
30-
--assert found? find ["test"] string!
31-
--assert found? find ["test"] series!
27+
--assert not none? find [#[datatype! string!] #[datatype! binary!]] #[datatype! binary!]
28+
--assert not none? find reduce [string! binary!] binary!
29+
--assert not none? find [#[datatype! string!] #[datatype! binary!]] #[datatype! binary!]
30+
--assert not none? find ["test"] string!
31+
--assert not none? find ["test"] series!
3232
--assert none? find reduce [integer! binary!] series!
3333
--assert ["aha"] = find reduce [integer! "aha"] series!
34-
--assert found? find any-string! ref!
34+
--assert not none? find any-string! ref!
3535

3636
===end-group===
3737

src/tests/units/enum-test.r3

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Rebol [
2525
--assert object? *FX-DX8
2626
--assert 0 = *FX-DX8/CHORUS
2727
--assert 8 = *FX-DX8/REVERB
28-
--assert found? find [ECHO FLANGER] *FX-DX8/name 4
28+
--assert not none? find [ECHO FLANGER] *FX-DX8/name 4
2929

3030

3131
--test-- "enum with mixed specification"

src/tools/make-make.reb

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ output: make string! 10000
302302
;** Functions
303303
;******************************************************************************
304304

305-
flag?: func ['word] [found? find build-flags word]
305+
flag?: func ['word] [not none? find build-flags word]
306306

307307
macro+: func [
308308
"Appends value to end of macro= line"

0 commit comments

Comments
 (0)