Open nnao45 opened 5 years ago
Hi.
I try to use this libraly, but dont move.
I check the receive json data. and I found bug.
Look,
{ "created_at": "Tue Jun 04 09:04:39 +0000 2019", "id": 1135834739275735000, "id_str": "1135834739275735040", "text": "RT @GRANDPA1345: พ่อคนนี้ชอบดูดๆครับดูกันน่ะ https://t.co/ahwlt9Xmq1", "source": "<a href=\"http://twitter.com/download/android\" rel=\"nofollow\">Twitter for Android</a>", "truncated": false, "in_reply_to_status_id": null, "in_reply_to_status_id_str": null, "in_reply_to_user_id": null, "in_reply_to_user_id_str": null, "in_reply_to_screen_name": null, "user": { "id": 1122047043306811400, "id_str": "1122047043306811392", "name": "PSARN", "screen_name": "PSARN2", "location": null, "url": null, "description": "6เชน", "translator_type": "none", "protected": false, "verified": false, "followers_count": 1, "friends_count": 81, "listed_count": 0, "favourites_count": 0, "statuses_count": 18, "created_at": "Sat Apr 27 07:57:16 +0000 2019", "utc_offset": null, "time_zone": null, "geo_enabled": false, "lang": null, "contributors_enabled": false, "is_translator": false, "profile_background_color": "F5F8FA", "profile_background_image_url": "", "profile_background_image_url_https": "", "profile_background_tile": false, "profile_link_color": "1DA1F2", "profile_sidebar_border_color": "C0DEED", "profile_sidebar_fill_color": "DDEEF6", "profile_text_color": "333333", "profile_use_background_image": true, "profile_image_url": "http://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png", "profile_image_url_https": "https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png", "default_profile": true, "default_profile_image": false, "following": null, "follow_request_sent": null, "notifications": null }, "geo": null, "coordinates": null, "place": null, "contributors": null, "retweeted_status": { "created_at": "Wed Nov 21 04:27:43 +0000 2018", "id": 1065099412035129300, "id_str": "1065099412035129345", "text": "พ่อคนนี้ชอบดูดๆครับดูกันน่ะ https://t.co/ahwlt9Xmq1", "display_text_range": [ 0, 27 ], "source": "<a href=\"http://twitter.com/download/android\" rel=\"nofollow\">Twitter for Android</a>", "truncated": false, "in_reply_to_status_id": null, "in_reply_to_status_id_str": null, "in_reply_to_user_id": null, "in_reply_to_user_id_str": null, "in_reply_to_screen_name": null, "user": { "id": 858856007975395300, "id_str": "858856007975395328", "name": "ชอบคนแก่ๆเพราะว่าคนแก่ๆน่ารักมากๆ", "screen_name": "GRANDPA1345", "location": "ประเทศไทย", "url": null, "description": "ชอบคนแก่บ้านๆครับ", "translator_type": "none", "protected": false, "verified": false, "followers_count": 38548, "friends_count": 840, "listed_count": 106, "favourites_count": 564, "statuses_count": 3371, "created_at": "Mon May 01 01:30:03 +0000 2017", "utc_offset": null, "time_zone": null, "geo_enabled": true, "lang": null, "contributors_enabled": false, "is_translator": false, "profile_background_color": "F5F8FA", "profile_background_image_url": "", "profile_background_image_url_https": "", "profile_background_tile": false, "profile_link_color": "1DA1F2", "profile_sidebar_border_color": "C0DEED", "profile_sidebar_fill_color": "DDEEF6", "profile_text_color": "333333", "profile_use_background_image": true, "profile_image_url": "http://pbs.twimg.com/profile_images/1107946296017477632/RDTeVVll_normal.jpg", "profile_image_url_https": "https://pbs.twimg.com/profile_images/1107946296017477632/RDTeVVll_normal.jpg", "profile_banner_url": "https://pbs.twimg.com/profile_banners/858856007975395328/1552990049", "default_profile": true, "default_profile_image": false, "following": null, "follow_request_sent": null, "notifications": null }, "geo": null, "coordinates": null, "place": null, "contributors": null, "is_quote_status": false, "quote_count": 1, "reply_count": 4, "retweet_count": 310, "favorite_count": 676, "entities": { "hashtags": [], "urls": [], "user_mentions": [], "symbols": [], "media": [ { "id": 1065098839592300500, "id_str": "1065098839592300545", "indices": [ 28, 51 ], "additional_media_info": { "monetizable": false }, "media_url": "http://pbs.twimg.com/ext_tw_video_thumb/1065098839592300545/pu/img/txjuUc_xNElETCv9.jpg", "media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/1065098839592300545/pu/img/txjuUc_xNElETCv9.jpg", "url": "https://t.co/ahwlt9Xmq1", "display_url": "pic.twitter.com/ahwlt9Xmq1", "expanded_url": "https://twitter.com/Nitinai12436455/status/1065099412035129345/video/1", "type": "photo", "sizes": { "thumb": { "w": 150, "h": 150, "resize": "crop" }, "small": { "w": 378, "h": 680, "resize": "fit" }, "large": { "w": 400, "h": 720, "resize": "fit" }, "medium": { "w": 400, "h": 720, "resize": "fit" } } } ] }, "extended_entities": { "media": [ { "id": 1065098839592300500, "id_str": "1065098839592300545", "indices": [ 28, 51 ], "additional_media_info": { "monetizable": false }, "media_url": "http://pbs.twimg.com/ext_tw_video_thumb/1065098839592300545/pu/img/txjuUc_xNElETCv9.jpg", "media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/1065098839592300545/pu/img/txjuUc_xNElETCv9.jpg", "url": "https://t.co/ahwlt9Xmq1", "display_url": "pic.twitter.com/ahwlt9Xmq1", "expanded_url": "https://twitter.com/Nitinai12436455/status/1065099412035129345/video/1", "type": "video", "video_info": { "aspect_ratio": [ 5, 9 ], "duration_millis": 88000, "variants": [ { "bitrate": 256000, "content_type": "video/mp4", "url": "https://video.twimg.com/ext_tw_video/1065098839592300545/pu/vid/180x324/D8807XBbFBajvrK_.mp4?tag=5" }, { "bitrate": 832000, "content_type": "video/mp4", "url": "https://video.twimg.com/ext_tw_video/1065098839592300545/pu/vid/400x720/sMjzNdshzwbCbnAB.mp4?tag=5" }, { "content_type": "application/x-mpegURL", "url": "https://video.twimg.com/ext_tw_video/1065098839592300545/pu/pl/d5qE6i5h_mjI5poS.m3u8?tag=5" } ] }, "sizes": { "thumb": { "w": 150, "h": 150, "resize": "crop" }, "small": { "w": 378, "h": 680, "resize": "fit" }, "large": { "w": 400, "h": 720, "resize": "fit" }, "medium": { "w": 400, "h": 720, "resize": "fit" } } } ] }, "favorited": false, "retweeted": false, "possibly_sensitive": false, "filter_level": "low", "lang": "th" }, "is_quote_status": false, "quote_count": 0, "reply_count": 0, "retweet_count": 0, "favorite_count": 0, "entities": { "hashtags": [], "urls": [], "user_mentions": [ { "screen_name": "GRANDPA1345", "name": "ชอบคนแก่ๆเพราะว่าคนแก่ๆน่ารักมากๆ", "id": 858856007975395300, "id_str": "858856007975395328", "indices": [ 3, 15 ] } ], "symbols": [], "media": [ { "id": 1065098839592300500, "id_str": "1065098839592300545", "indices": [ 45, 68 ], "additional_media_info": { "monetizable": false }, "media_url": "http://pbs.twimg.com/ext_tw_video_thumb/1065098839592300545/pu/img/txjuUc_xNElETCv9.jpg", "media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/1065098839592300545/pu/img/txjuUc_xNElETCv9.jpg", "url": "https://t.co/ahwlt9Xmq1", "display_url": "pic.twitter.com/ahwlt9Xmq1", "expanded_url": "https://twitter.com/Nitinai12436455/status/1065099412035129345/video/1", "type": "photo", "sizes": { "thumb": { "w": 150, "h": 150, "resize": "crop" }, "small": { "w": 378, "h": 680, "resize": "fit" }, "large": { "w": 400, "h": 720, "resize": "fit" }, "medium": { "w": 400, "h": 720, "resize": "fit" } }, "source_status_id": 1065099412035129300, "source_status_id_str": "1065099412035129345", "source_user_id": 858856007975395300, "source_user_id_str": "858856007975395328" } ] }, "extended_entities": { "media": [ { "id": 1065098839592300500, "id_str": "1065098839592300545", "indices": [ 45, 68 ], "additional_media_info": { "monetizable": false }, "media_url": "http://pbs.twimg.com/ext_tw_video_thumb/1065098839592300545/pu/img/txjuUc_xNElETCv9.jpg", "media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/1065098839592300545/pu/img/txjuUc_xNElETCv9.jpg", "url": "https://t.co/ahwlt9Xmq1", "display_url": "pic.twitter.com/ahwlt9Xmq1", "expanded_url": "https://twitter.com/Nitinai12436455/status/1065099412035129345/video/1", "type": "video", "video_info": { "aspect_ratio": [ 5, 9 ], "duration_millis": 88000, "variants": [ { "bitrate": 256000, "content_type": "video/mp4", "url": "https://video.twimg.com/ext_tw_video/1065098839592300545/pu/vid/180x324/D8807XBbFBajvrK_.mp4?tag=5" }, { "bitrate": 832000, "content_type": "video/mp4", "url": "https://video.twimg.com/ext_tw_video/1065098839592300545/pu/vid/400x720/sMjzNdshzwbCbnAB.mp4?tag=5" }, { "content_type": "application/x-mpegURL", "url": "https://video.twimg.com/ext_tw_video/1065098839592300545/pu/pl/d5qE6i5h_mjI5poS.m3u8?tag=5" } ] }, "sizes": { "thumb": { "w": 150, "h": 150, "resize": "crop" }, "small": { "w": 378, "h": 680, "resize": "fit" }, "large": { "w": 400, "h": 720, "resize": "fit" }, "medium": { "w": 400, "h": 720, "resize": "fit" } }, "source_status_id": 1065099412035129300, "source_status_id_str": "1065099412035129345", "source_user_id": 858856007975395300, "source_user_id_str": "858856007975395328" } ] }, "favorited": false, "retweeted": false, "possibly_sensitive": false, "filter_level": "low", "lang": "th", "timestamp_ms": "1559639079289" }
So, user.lang is null !! But this lib json serialize lang: Cow<'a, str> ...can't move.
null
lang: Cow<'a, str>
I checking code is here. https://gist.github.com/nnao45/7f606911d2715b4f29ebb7725a5da7ae
You check it.
Hi.
I try to use this libraly, but dont move.
I check the receive json data.
and I found bug.
Look,
So, user.lang is
null
!! But this lib json serializelang: Cow<'a, str>
...can't move.I checking code is here. https://gist.github.com/nnao45/7f606911d2715b4f29ebb7725a5da7ae
You check it.