jikstra
8274c6bf17
Allow non_snake_case in dc_replace_bad_utf8_chars function
2019-07-31 16:26:17 +02:00
jikstra
566d255b33
run cargo fmt
2019-07-31 16:26:17 +02:00
jikstra
9fb9fb0fc1
Remove goto/current_block logic with OK_TO_CONTINUE. Keeps identation
2019-07-31 16:26:17 +02:00
Alexander Krotov
164a8fe39a
encode_66bits_as_base64: use base64 crate
2019-07-31 16:25:01 +02:00
Alexander Krotov
0b679f8b95
dc_tools: Make dc_create_id() safe
2019-07-31 16:25:01 +02:00
Dmitry Bogatov
73298c0273
chore: fix and enforce compiler warnings on CI
2019-07-30 09:58:28 +02:00
Friedel Ziegelmayer
b44c7928f2
Merge pull request #265 from link2xt/safe_cb_set_config
...
Make cb_set_config() safe
2019-07-30 09:53:56 +02:00
Friedel Ziegelmayer
dd9b83dc24
Merge pull request #264 from link2xt/key-to_asc-safe
...
Make key::to_asc return String
2019-07-30 09:53:42 +02:00
Friedel Ziegelmayer
e79c168279
Merge pull request #263 from link2xt/sql-is_file_in_use-safe
...
sql.rs: make is_file_in_use() safe
2019-07-30 09:53:13 +02:00
Alexander Krotov
707c8c2830
Make dc_split_armored_data return bool ( #251 )
...
* Make dc_split_armored_data return bool
* Remove double negations
2019-07-30 08:46:36 +02:00
Alexander Krotov
f87c98d6ea
Make cb_set_config() safe
2019-07-30 02:43:50 +03:00
Alexander Krotov
3ace4fcc2f
Make key::to_asc return String
2019-07-30 02:22:08 +03:00
Friedel Ziegelmayer
9314a5a8fd
Merge pull request #252 from link2xt/dc_get_config-safe
...
Make dc_get_config_t safe
2019-07-30 00:25:29 +02:00
Friedel Ziegelmayer
5bf2d7c5ac
Merge pull request #253 from link2xt/is_file_size_okay-bool
...
Return bool from is_file_size_okay
2019-07-30 00:24:13 +02:00
Friedel Ziegelmayer
1fbd16310a
Merge pull request #262 from link2xt/thread-constants
...
dc_job.rs: add DC_{IMAP,SMTP}_THREAD constants
2019-07-30 00:23:34 +02:00
Friedel Ziegelmayer
7ba1a6f79f
Merge pull request #255 from link2xt/dc_open-safer
...
Make dc_open arguments rusty
2019-07-30 00:21:03 +02:00
Friedel Ziegelmayer
2c66837df4
Merge pull request #261 from link2xt/dc_timestamp_to_str
...
Remove unsafe version of dc_timestamp_to_str
2019-07-30 00:19:33 +02:00
Alexander Krotov
21b4147d15
sql.rs: make is_file_in_use() safe
2019-07-30 01:15:51 +03:00
KAction
0c082fac7b
refactor: remove unused import of qsort() from C library (
2019-07-30 00:10:22 +02:00
Alexander Krotov
03603a48a0
dc_job.rs: add DC_{IMAP,SMTP}_THREAD constants
2019-07-29 20:20:52 +03:00
Alexander Krotov
27342f50b5
Remove unsafe version of dc_timestamp_to_str
2019-07-29 18:45:12 +03:00
Alexander Krotov
2d5b04148f
Make dc_open arguments rusty
2019-07-29 04:05:21 +03:00
Alexander Krotov
dfce34f275
Return bool from is_file_size_okay
2019-07-29 03:14:21 +03:00
Friedel Ziegelmayer
188da2a020
refactor(params): rustify
2019-07-29 01:49:53 +02:00
Alexander Krotov
3f445a3a6c
Make dc_get_config_t safe
2019-07-28 23:57:28 +03:00
Dmitry Bogatov
669ed0e0df
Override non_camel_case_types warning on per-declaration basis
2019-07-28 22:44:21 +02:00
Dmitry Bogatov
c6ccfd824e
Override `non_shake_case' warning on per-function basis
...
This change removes global override of `non_shake_case' warning and replaces it
with per-function overrrides. This way, compiler will complain about style
guide violation in new code.
It should be noted, that `rustc' is not smart enough to emit warning when
override is no longer needed, it must be checked manually.
2019-07-28 22:44:21 +02:00
Dmitry Bogatov
39cc93240f
Fix 'non_upper_case_globals' compiler warnings
2019-07-28 22:44:21 +02:00
Alexander Krotov
6c818c6123
Make dc_tools::dc_exactly_one_bit_set safe and return bool
2019-07-28 22:40:30 +02:00
Alexander Krotov
3eaab07b0b
top_evil_rs.py: remove comments before counting
...
For example, constants.rs is completely safe now, but has "free()" in the comments.
2019-07-28 22:39:39 +02:00
Alexander
0cffbaf1e9
refactor: rename dc_array_t::as_ptr() into dc_array_t::into_raw()
...
By convention as_* functions do not consume self by taking the reference.
2019-07-28 20:31:57 +02:00
Friedel Ziegelmayer
c34e66adb6
Make dc_create_setup_code() safe ( #239 )
...
Make dc_create_setup_code() safe
2019-07-28 19:50:25 +02:00
Alexander
0132106c7e
fix(imex): dc_decrypt_setup_file: extend lifetime of CString
...
payload_c binding makes sure the memory is not freed until strdup exits.
See as_ptr documentation:
https://doc.rust-lang.org/std/ffi/struct.CString.html#method.as_ptr
2019-07-28 19:47:52 +02:00
Alexander
5a8b4748b8
fix(msg): correct return value for dc_msg_is_setupmessage
...
It is broken since 8a0fc609e6
where 0i32 was replaced with true instead of false.
2019-07-28 18:33:31 +02:00
Alexander Krotov
3033d8100d
Test dc_create_setup_code() without to_cstring()
2019-07-28 15:05:28 +03:00
Alexander Krotov
0e6b12d7ae
Move to_string out of dc_create_setup_code
2019-07-28 15:05:28 +03:00
Friedel Ziegelmayer
2407604e37
Merge pull request #211 from link2xt/dc_array-cleanup
...
dc_array_t cleanup
2019-07-28 11:51:08 +02:00
Friedel Ziegelmayer
b23ca26908
refactor(chatlist): rustify
2019-07-28 11:32:48 +02:00
Alexander Krotov
21d94b1d09
Remove misplaced comment
2019-07-27 19:28:39 +03:00
Alexander Krotov
ae1cbc9596
dc_array: store locations as Vec<dc_location>
2019-07-27 19:28:39 +03:00
Alexander Krotov
86d047f618
dc_chat: use get_id instead of accessing array fields directly
2019-07-27 19:28:39 +03:00
Alexander Krotov
1cd7cb541c
Rewrite most location array member accessors
2019-07-27 19:28:39 +03:00
Alexander Krotov
f27dda86ff
Move dc_array_search_id into dc_array_t implementation
2019-07-27 19:28:39 +03:00
Alexander Krotov
51319f89e8
Create dc_array_t in dc_get_locations without unsafe
2019-07-27 19:28:39 +03:00
Alexander Krotov
8b4acbb63a
Move dc_array_get_ptr inside dc_array_t implementation
2019-07-27 19:28:39 +03:00
Alexander Krotov
928361429e
Move dc_array_get_{uint,id} inside dc_array_t implementation
2019-07-27 19:28:39 +03:00
Alexander Krotov
c17632188a
Avoid using return in dc_array_get_cnt implementation
2019-07-27 19:28:39 +03:00
Alexander Krotov
ea3c89e913
Move dc_array_unref logic inside dc_array_t implementation
...
This will allow to make dc_array_t members private in the future.
2019-07-27 19:28:39 +03:00
Alexander Krotov
ea84edf13a
Implement dc_array_t::len()
2019-07-27 19:28:39 +03:00
Alexander Krotov
c335348f20
Implement dc_array_t::is_empty()
2019-07-27 19:28:39 +03:00